DB Internals AtlasPostgreSQL 18.6 Home About

Parameter · Replication / Standby Servers

wal_receiver_timeout

Sets the maximum wait time to receive data from the sending server. 0 disables the timeout.

  • Default: 1min
  • Type: integer (ms)
  • Range: 0 … max (2147483647)
  • Applies: Reload

In plain words

The mirror image of wal_sender_timeout: if the standby's WAL receiver gets no data or keepalive from the primary for this long, it assumes the connection is dead, drops it and reconnects. Without this, a silently broken network could leave the standby waiting forever.

Default 60 seconds; 0 disables it.

For DBAs and operators

When nothing has arrived for half of this time, the WAL receiver asks the primary for a reply, so a healthy idle connection is never silent this long. When the limit is reached:

FATAL: terminating walreceiver due to timeout

The startup process then retries (archive, pg_wal, streaming) after wal_retrieve_retry_interval. Also used by logical replication apply workers on subscribers (they inherit it from the subscriber's configuration).

Frequent occurrences point at network devices dropping long-lived TCP sessions, an overloaded primary, or a walsender blocked on disk I/O. TCP keepalive settings in primary_conninfo (keepalives_idle …) help detect dead peers at the socket level as well.

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 Logical replication workers

Related parameters

wal_sender_timeout wal_receiver_status_interval wal_retrieve_retry_interval primary_conninfo

All Replication parameters