Re: uptime() for postmaster

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: uptime() for postmaster
Date: 2005-01-04 00:50:11
Message-ID: crcp81$7eg$1@floppy.pyrenet.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Matthias Schmidt wrote:
> Hi Tom,
>
> Am 31.12.2004 um 20:18 schrieb Tom Lane:
>
>> Matthias Schmidt <schmidtm(at)mock-software(dot)de> writes:
>>
>>> a) is the name uptime() OK?
>>
>>
>> Probably should use pg_uptime(), or something else starting with pg_.
>
>
> What about 'pg_starttime()' since it is not a period but a point-in-time?
>
>>
>>> b) is the return-type 'Interval' OK?
>>
>>
>> It might be better to return the actual postmaster start time (as
>> timestamptz) and let the user do whatever arithmetic he wants.
>> With an interval, there's immediately a question of interpretation
>> --- what current timestamp did you use in the computation?
>> I'm not dead set on this, but it feels cleaner.
>
>
> you're right. Let's go for timestamptz and let the users decide ...
>

Well, the unix guys have the abit to have the uptime as an interval, I'm
inclined to have boths: pg_uptime ( interval ) and pg_starttime (
timestamptz )

Regards
Gaetano Mendola

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-01-04 00:56:53 Re: Implementing RESET CONNECTION ...
Previous Message Bruce Momjian 2005-01-04 00:14:16 Re: [HACKERS] Bgwriter behavior