Re: How to get postmaster shut down time in postgres? - Mailing list pgsql-general

From Fabio Pardi
Subject Re: How to get postmaster shut down time in postgres?
Date
Msg-id e8eb3fd8-20c1-4694-d2a3-240b9cebbcea@portavita.eu
Whole thread Raw
In response to How to get postmaster shut down time in postgres?  (pavan95 <pavan.postgresdba@gmail.com>)
List 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
> 


pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: How to get postmaster shut down time in postgres?
Next
From: Adrian Klaver
Date:
Subject: Re: [HACKERS] Code of Conduct plan