I am working with postgresql-9.4 and for support and monitoring tasks I need to know how long my server has been up for? Is there any function or way to know this? Is there an sql way to know when my server started?
I really need to know the elapsed time since it started?
Best Answer
Use the built-in function
pg_postmaster_start_time
More details in the manual: http://www.postgresql.org/docs/current/static/functions-info.html
If you want seconds, use
extract
: