Re: How to get the postmaster shut downtime dynamically and insert into a table?

From: pavan95 <pavan(dot)postgresdba(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: How to get the postmaster shut downtime dynamically and insert into a table?
Date: 2018-06-04 11:26:21
Message-ID: 1528111581735-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Pierre Ochsenbein 2018-06-05 13:14:20 PostgreSQL Streaming replication on two diff networks
Previous Message Stéphane KANSCHINE 2018-06-04 05:21:37 Re: Update: pgAdmin4 3.0 rpm repo for Fedora 28