pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pavan95 <pavan.postgresdba@gmail.com>
To: pgsql-general@postgresql.org
Subject: Re: How to get postmaster shut down time in postgres?
Date: Tue, 5 Jun 2018 00:18:12 -0700 (MST)
Message-ID: <1528183092939-0.post@n3.nabble.com> (raw)
In-Reply-To: <31954.1528133472@sss.pgh.pa.us>
References: <1528118250600-0.post@n3.nabble.com>
	<CANu8FiyrGKbNxd39rh8xJ1B_o+61jO6B5K1xSbVWK6f9WdoiJg@mail.gmail.com>
	<1528119860207-0.post@n3.nabble.com>
	<CAKFQuwbuD8kh01V07MX2ZJeJ7_Hr1PZ9EJWGEq9SSvHpd1QEtQ@mail.gmail.com>
	<31954.1528133472@sss.pgh.pa.us>

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

In my view this work meets my requirement. Kindly suggest if it appropriate
to do like this. 

Regards,
Pavan



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html




view thread (14+ messages)

Message-ID: <1528183092939-0.post@n3.nabble.com>
Permalink:  ../1528183092939-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1528183092939-0.post@n3.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: pavan.postgresdba@gmail.com
  Subject: Re: How to get postmaster shut down time in postgres?
  In-Reply-To: <1528183092939-0.post@n3.nabble.com>
  References: <1528118250600-0.post@n3.nabble.com> <CANu8FiyrGKbNxd39rh8xJ1B_o+61jO6B5K1xSbVWK6f9WdoiJg@mail.gmail.com> <1528119860207-0.post@n3.nabble.com> <CAKFQuwbuD8kh01V07MX2ZJeJ7_Hr1PZ9EJWGEq9SSvHpd1QEtQ@mail.gmail.com> <31954.1528133472@sss.pgh.pa.us> <1528183092939-0.post@n3.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox