Re: How to determine date / time of last postmaster restart

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to determine date / time of last postmaster restart
Дата
Msg-id 22041.1126052554@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to determine date / time of last postmaster restart  (adey <adey11@gmail.com>)
Список pgsql-admin
adey <adey11@gmail.com> writes:
> Please let me know if there is a way to determine when the Postmaster was
> last restarted?

The last postmaster start time, or the last database reset?  These are
not the same if any backends have crashed since the postmaster started.
For determining stats lifespan I think you need the latter.

Offhand I think the file timestamp of $PGDATA/postmaster.opts would do
for the postmaster start time, and postmaster.pid for the other (I think
postmaster.pid is updated during a reset).

PG 8.1 will have a function to return postmaster start time, but not
database reset time.  I wonder if this is misdefined --- if you are
trying to measure database uptime, the last reset would be more
appropriate to track.

            regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq


В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Disabling WAL for bulk data loads
Следующее
От: Jaime Casanova
Дата:
Сообщение: Re: Alter Table vs. Rename/Create/Drop table with plpgsql functions.