Re: Monitoring Replication - Postgres 9.2 - Mailing list pgsql-general

From John R Pierce
Subject Re: Monitoring Replication - Postgres 9.2
Date
Msg-id 1e475468-f2bc-62c8-e9b4-ba68523dece0@hogranch.com
Whole thread Raw
In response to Re: Monitoring Replication - Postgres 9.2  (Patrick B <patrickbakerbr@gmail.com>)
Responses Re: Monitoring Replication - Postgres 9.2  (Patrick B <patrickbakerbr@gmail.com>)
List pgsql-general
On 11/29/2016 5:10 PM, Patrick B wrote:

Yep.. once a minute or so. And yes, I need to store a history with timestamp.

Any idea? :)

so create a table with a timestamptz, plus all the fields you want, have a script (perl?  python?  whatever your favorite poison is with database access) that once a minute executes those two queries (you'll need two database connections since only the slave knows how far behind it is), and inserts the data into your table.


-- 
john r pierce, recycling bits in santa cruz

pgsql-general by date:

Previous
From: Patrick B
Date:
Subject: Re: Monitoring Replication - Postgres 9.2
Next
From: Patrick B
Date:
Subject: Re: Monitoring Replication - Postgres 9.2