Parameter · Replication / Standby Servers
wal_receiver_status_interval
Sets the maximum interval between WAL receiver status reports to the sending server.
- Default:
10s - Type: integer (s)
- Range: 0 … 2147483s
- Applies: Reload
In plain words
The standby's WAL receiver tells the primary how far it has written, flushed and replayed the WAL. It does so whenever its position changes, and at least every wal_receiver_status_interval even when nothing happens. These reports feed pg_stat_replication, synchronous replication and hot standby feedback.
For DBAs and operators
Reports are also sent immediately after new WAL is flushed and, with synchronous_commit = remote_apply, after it is applied; the interval only bounds the gap when things are quiet. The replay position shown on the primary can therefore lag a little behind reality. 0 disables these routine reports, including those on position changes: the standby then reports only in special cases: on connect, when the primary asks for a reply, when it pings the primary after half of wal_receiver_timeout, and for remote_apply feedback.
The replies also keep the connection alive from the primary's point of view. When half of wal_sender_timeout passes without a reply, the WAL sender asks for one, so a live but idle standby is not disconnected with LOG: terminating walsender process due to replication timeout. With hot_standby_feedback, the xmin is sent at most this often too.
SELECT application_name, write_lsn, flush_lsn, replay_lsn,
write_lag, flush_lag, replay_lag, reply_time
FROM pg_stat_replication;How to change it
Change in postgresql.conf or ALTER SYSTEM, then run SELECT pg_reload_conf().
See it in context
WAL receiver Streaming replication Synchronous replication Hot standby and recovery conflicts
Related parameters
wal_sender_timeout wal_receiver_timeout hot_standby_feedback synchronous_commit