pg_is_wal_replay_paused()

A function indicating whether recovery pause is requested.

pg_is_wal_replay_paused() is a system function indicating whether WAL recovery pause is requested.

pg_is_wal_replay_paused() was added in PostgreSQL 9.1.

Usage

pg_is_wal_replay_paused () → boolean

Note that if pg_is_wal_replay_paused() returns true, this indicates that recovery pause has been requested (via pg_wal_replay_pause(). To deterimine the actual state of the pause request, execute pg_get_wal_replay_pause_state() (PostgreSQL 14 and later).

Change history

Examples

Basic usage example for pg_is_wal_replay_paused():

postgres=# SELECT pg_wal_replay_pause();
 pg_wal_replay_pause
---------------------

(1 row)

postgres=# SELECT pg_is_wal_replay_paused();
 pg_is_wal_replay_paused
-------------------------
 t
(1 row)

postgres=# SELECT pg_wal_replay_resume();
 pg_wal_replay_resume
----------------------

(1 row)

postgres=# SELECT pg_is_wal_replay_paused();
 pg_is_wal_replay_paused
-------------------------
 f
(1 row)

Categories

System function, WAL

See also

pg_get_wal_replay_pause_state()