Re: How to get the postmaster shut downtime dynamically and insertinto a table? - Mailing list pgsql-admin

From pavan95
Subject Re: How to get the postmaster shut downtime dynamically and insertinto a table?
Date
Msg-id 1528111581735-0.post@n3.nabble.com
Whole thread Raw
Responses Re: How to get the postmaster shut downtime dynamically and insertinto a table?  (pavan95 <pavan.postgresdba@gmail.com>)
List pgsql-admin
Hi all,

In postgres pg_postmaster_start_time() function gives us the time when
postmaster was last restarted.

Similarly, My requirement is to get the time when the postmaster has stopped
and the duration it has taken for the start of the server. 

AFAIK, the shutdown time is present in the log file alone. Is there any
function wherein which we can get the stop time of the postmaster.

My requirement is to dynamically store the shutdown time into a table
whenever postmaster shutdowns.

Any help in achieving this would be really great.


Regards,
Pavan 



--
Sent from: http://www.postgresql-archive.org/PostgreSQL-admin-f2076596.html


pgsql-admin by date:

Previous
From: Stéphane KANSCHINE
Date:
Subject: Re: Update: pgAdmin4 3.0 rpm repo for Fedora 28
Next
From: Pierre Ochsenbein
Date:
Subject: PostgreSQL Streaming replication on two diff networks