Re: postgres uptime - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: postgres uptime
Date
Msg-id 41255731.5030308@familyhealth.com.au
Whole thread Raw
In response to postgres uptime  (Gaetano Mendola <mendola@bigfoot.com>)
Responses Re: postgres uptime  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: postgres uptime  (Gaetano Mendola <mendola@bigfoot.com>)
List pgsql-hackers
> It seems that there is no way to know the postgres
> uptime, a sort of uptime() function could be usefull.
> I had recently the necessity of detect a node fail over,
> and the only way I can do it with a SQL connection is asking
> the engine uptime. Of course I can do it with PS but
> now that windows version is out I believe a platform
> indipendent way is required. Any objection to add it ?

That sounds like a cool idea to me, although I would suggest a function 
pg_uptime() that returns an interval or something.

However, adding a new function requires a re-initdb, so it's quite 
unlikely this will be in for 8.0.

Chris



pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: All three packages ...
Next
From: Philip Warner
Date:
Subject: Re: tablespace and sequences?