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

From: pavan95 <pavan(dot)postgresdba(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to get postmaster shut down time in postgres?
Date: 2018-06-05 07:01:51
Message-ID: 1528182111958-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Tom Lane,

I'm glad that I got a reply from you. And yes you are exactly correct. I am
looking for the time that shutdown begins.

I fulfilled my requirement by adding a piece of code before the initiation
of shutdown in the postgresql service file located in /etc/init.d folder of
my ubuntu server. It works perfectly fine and the sample output is shown as
below:

reported | shutdown_time |
startup_time
---------------------------------+--------------------------+----------------------------------
2018-06-05 12:15:00.63332 | /2018-06-05 12:15:00/ | 2018-06-05
12:09:57.625046+05:30
|
| 2018-06-05 12:15:05.28899+05:30

Where the shutdown time in the first row is the latest shutdown time and
second row startup time is the server start time.

I hope this will suffice my requirement. If you have found anything wrong in
this kindly correct me.

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 pavan95 2018-06-05 07:15:18 Re: How to get postmaster shut down time in postgres?
Previous Message Tom Lane 2018-06-05 04:55:13 Re: Code of Conduct plan