From: pavan95 <pavan.postgresdba@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: How to get the postmaster shut downtime dynamically and insert into a table?
Date: Mon, 4 Jun 2018 04:26:21 -0700 (MST)
Message-ID: <1528111581735-0.post@n3.nabble.com> (raw)
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
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: pavan.postgresdba@gmail.com
Subject: Re: How to get the postmaster shut downtime dynamically and insert into a table?
In-Reply-To: <1528111581735-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