Re: postgres uptime

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Gaetano Mendola <mendola(at)bigfoot(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: postgres uptime
Date: 2004-08-20 04:04:29
Message-ID: 200408200404.i7K44Tp06084@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marc G. Fournier wrote:
> On Thu, 19 Aug 2004, Tom Lane wrote:
>
> > Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> >> Is the uptime kept internally anywhere? Or even the start time?
> >
> > No, and no (at least not in any globally accessible variable).
> >
> >> If it is, it would be quite trivial to provide access to it
> >
> > Not really --- in the EXEC_BACKEND case, we'd have to do something
> > explicit to pass the value down to backends.
>
> Couldn't it be stored in shared memory?

We already have a mechanism to pass global variables to EXEC_BACKEND so
that part is pretty simple.

> > I'd like to see more than one person requesting this (and with solider
> > rationales) before it gets added to TODO. If I wanted to be picky I
> > would suggest that knowledge of the server start time might be useful
> > information to an attacker. It would for instance narrow down the
> > number of possible starting seeds for the postmaster's random number
> > generator.
>
> Wouldn't an attacker have to have access to the server in the first place
> to get that information?

I think so, and if they do, they can use 'ps' to see the start time of
the postmaster.

However, I do think this is an 8.1 item.

--
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2004-08-20 04:04:34 Re: tablespace and sequences?
Previous Message Marc G. Fournier 2004-08-20 03:56:51 Re: postgres uptime