Re: uptime function to postmaster

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org, schmidtm(at)mock-software(dot)de
Subject: Re: uptime function to postmaster
Date: 2005-06-14 21:04:06
Message-ID: 200506142104.j5EL46Z20421@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Euler Taveira de Oliveira wrote:
> Hi Bruce,
>
> > I think we should return intervals only when we can't return
> > meaningful
> > timestamp values. I don't have any logic to back up that opinion,
> > though.
> >
> Agreed.
>
> >
> > We need to preceed our function names with pg_ for cases like this
> > where
> > we are supplying pg-specific behavior.
> >
> Agreed.
>
> An updated version of the patch is attached. It is just implement
> 'pg_start_time' function that works in multi-user and stand-alone. Docs
> is attached too.

I have applied the attached patch, calling the function
pg_postmaster_start_time(). I realize a stand-alone backend doesn't
have a postmaster, but this is probably as clear as we are going to get.

Do we want this to be executed only by super-users? I know there was
some discussion about that but I didn't see a conclusion. The only
argument I heard was something about random seeds, but that seemed like
a weak argument.

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

Attachment Content-Type Size
unknown_filename text/plain 6.9 KB

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-06-14 22:16:34 Re: Tiny patch on print.c of psql
Previous Message Bruce Momjian 2005-06-14 20:44:17 Re: SHOW ALL with descriptions