PostgreSQL‎ > ‎

Standby

Subpage Listing


NB! Any changes to recovery.conf require DB instance restart to take effect. Can't just reload.

Basic Lag Query (run from standby):
select pg_last_xact_replay_timestamp(), now() - pg_last_xact_replay_timestamp() as lag;

Or:
select now()
  , pg_last_xlog_receive_location() "receive_location"
  , pg_last_xlog_replay_location() "replay_location"
  , pg_is_in_recovery() "recovery_status"
  , now()-pg_last_xact_replay_timestamp() "lag";

Subpages (1): Standby WAL Workflow
Comments