Re: How to get postmaster shut down time in postgres?

From: Fabio Pardi <f(dot)pardi(at)portavita(dot)eu>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to get postmaster shut down time in postgres?
Date: 2018-06-04 14:03:41
Message-ID: e8eb3fd8-20c1-4694-d2a3-240b9cebbcea@portavita.eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If i were you, i would parse the logfile as others already mentioned. It
is easy and clean.

Another option might be to modify the init script and add a timestamp to
a file whenever it stops/starts your server. Or maybe you can add to the
init file a script that fills in your table, but i m not sure it is best
practice.

Else, we use monitoring for that, but in most cases the timestamps will
not be that accurate.

regards,

fabio pardi

On 06/04/2018 03:17 PM, pavan95 wrote:
> Hi all,
>
> Is there any way to get postmaster(postgres database) shutdown time? Please
> help!!
>
> Thanks in Advance.
>
>
> Regards,
> Pavan
>
>
>
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-06-04 14:06:50 Re: [HACKERS] Code of Conduct plan
Previous Message Ron 2018-06-04 14:00:14 Re: How to get postmaster shut down time in postgres?