Re: postgres uptime - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: postgres uptime
Date
Msg-id 200408201804.i7KI4GG09210@candle.pha.pa.us
Whole thread Raw
In response to Re: postgres uptime  (Andreas Pflug <pgadmin@pse-consulting.de>)
Responses Re: postgres uptime
Re: postgres uptime
List pgsql-hackers
Andreas Pflug wrote:
> Robert Treat wrote:
> 
> > 
> > If we do add this function, I guarantee you that you'll see it added to
> > phppgadmin and pgadmin, because it helps make these remote
> > administration tools more complete. 
> 
> :-)
> Guess what I just implemented...
> 
> pg_postmaster_starttime() RETURNS timestamp, currently implemented in 
> the admin module for win32  using GetProcessTimes(PostmasterHandle).
> 
> What's the equivalent for posix? Interpreting popen("ps...") might get 
> messy.

I think we should just call gettimeofday() at postmaster start and store
it somewhere.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_subtrans and WAL
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE