Monitoring Replication - Postgres 9.2

From: Patrick B <patrickbakerbr(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Monitoring Replication - Postgres 9.2
Date: 2016-11-29 23:31:25
Message-ID: CAJNY3isBMpVqN7J_sDeU0FzV2rME-w7nLA83=NY-29gbbbu_1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi guys,

I use these queries to monitor the streaming replication:

*on master:*
select client_addr, state, sent_location, write_location, flush_location,
replay_location, sync_priority from pg_stat_replication;

*On slave:*
select now() - pg_last_xact_replay_timestamp() AS replication_delay;

Can I create a table to store that data?
I also need the data is constantly put into this table. How would be the
best way to do it?

Cheers
Patrick

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-11-29 23:41:48 Re: Index size
Previous Message Samuel Williams 2016-11-29 23:30:53 Index size