Thread: Time of 'pg_ctl reload'.

Time of 'pg_ctl reload'.

From
Alexi Gen
Date:
Thank you Michael!

I have another question - related to this.
If I make changes to the postgresql.conf and then do a 'pg_ctl reload', how do I get the date & time of this event?

Cheers!
Alexi Gen


On Mon, Aug 18, 2008 at 03:53:32AM -0700, Alexi Gen wrote:
> Is there a table/view available from where I can check what time the cluster was started?
> Need this to calculate the uptime of the cluster.

In PostgreSQL 8.1 and later you can run these queries to get the start
time and uptime:

SELECT pg_postmaster_start_time();
SELECT now() - pg_postmaster_start_time();

--
Michael Fuhr

Send instant messages to your online friends http://uk.messenger.yahoo.com

Re: Time of 'pg_ctl reload'.

From
hubert depesz lubaczewski
Date:
> If I make changes to the postgresql.conf and then do a 'pg_ctl reload', how do I get the date & time of this event?

it will be added in 8.4:

http://www.depesz.com/index.php/2008/05/05/waiting-for-84-pg_conf_load_time-time-related-generate_series-and-enum-values-in-dt/

depesz

--
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007