Re: postgres uptime

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: postgres uptime
Date: 2004-08-21 00:35:22
Message-ID: 16688.1093048522@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gaetano Mendola <mendola(at)bigfoot(dot)com> writes:
>> I think we should just call gettimeofday() at postmaster start and store
>> it somewhere.

> Isn't the shared memory a good place ?

Depends. Do you want to reset it during a backend-crash-recovery cycle?
You'll have to, if it's only stored in shared memory. Depending on what
your definition of "uptime" is, that could be a reasonable thing to do,
or not.

There's been a remarkable lack of discussion about exactly what this
number would mean, anyway. Does "postmaster start" mean postmaster
process start? Or when we are first ready to receive a connection?
There could be a *very* large difference, in the case of a hot-standby
postmaster.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-08-21 03:08:45 Re: devx article
Previous Message Joshua D. Drake 2004-08-21 00:25:54 Re: devx article