Re: Monitoring Replication - Postgres 9.2

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Monitoring Replication - Postgres 9.2
Date: 2016-11-30 01:21:31
Message-ID: 1e475468-f2bc-62c8-e9b4-ba68523dece0@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Patrick B 2016-11-30 01:40:34 Re: Monitoring Replication - Postgres 9.2
Previous Message Patrick B 2016-11-30 01:10:53 Re: Monitoring Replication - Postgres 9.2