Translate into your own language

Friday, December 26, 2025

How to control the streaming replication

 




1. Check if WAL replay (recovery) is paused

SELECT pg_is_wal_replay_paused();

Output:

  • true → WAL replay is paused

  • false → WAL replay is running


2. Pause WAL replay (recovery)

SELECT pg_wal_replay_pause();

    - Pauses WAL replay immediately
    - Works only on a standby server (read replica)


3. Resume WAL replay (recovery)

SELECT pg_wal_replay_resume();

    - Resumes WAL replay if it was paused



No comments:

Post a Comment