Halting and Resuming Replication In PostgreSQL
Halting and Resuming Replication In PostgreSQL
Sometimes we want WAL records should flow from primary to standby, and WAL records should be flushed to
disk on standby but should not replay, which means WAL records should be stored on remote WAL segments
but should not be restored on standby.
On standby server
select pg_is_wal_replay_paused();
select pg_wal_replay_pause();
On Primary Server
On standby server
select pg_wal_replay_resume();
On Primary Server
write_lsn: wal records are written to Operating System cache but not written to disk.
flush_lsn: wal records are written to Disk from Operating System cache.