Skip to content

Monitoring Replication

The cluster list on the RCS form opens each member's replication statistics.

Cluster list of an RCS

Primary cluster statistics

Click the primary's line. The form shows the WAL sender processes feeding the standbys.

Primary cluster pg_stat_replication

For what each column means, see the PostgreSQL docs for your server version — for example pg_stat_replication.

Standby statistics

Click a standby's line. The form combines:

  • the pg_stat_wal_receiver view
  • the recovery status, computed from this query:
SELECT 
    now() as db_time,
    pg_is_in_recovery(),
    pg_last_xact_replay_timestamp(), 
    pg_last_wal_receive_lsn(), 
    pg_last_wal_replay_lsn(),
    CASE WHEN pg_is_in_recovery() THEN pg_is_wal_replay_paused() ELSE false END AS pg_is_wal_replay_paused;

From these Muppy derives the replication lag, in seconds and in bytes.

Standby cluster replication statistics

See pg_stat_wal_receiver for the full description.

Refreshing the statistics

Update Facts in the RCS header refreshes the statistics of every member.

The Update Facts button on an individual cluster refreshes that cluster only.

Refreshing one cluster's statistics