Skip to content

wal_receiver_timeout

wal_receiver_timeout — Sets the maximum wait time to receive data from the sending server. Observed in PG9.3–19 Beta 3; its last measured boot default is 1 min in PG19 Beta 3, with user context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA.
Note

Fact — official short description: “Sets the maximum wait time to receive data from the sending server.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valueuser
Settable by an ordinary user
Unit , Valuems
Raw unit
Range , Value02147483647
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueReplication / Standby Servers
Upstream classification
Latest boot value , Value60000
1 min

Lifecycle

Fact Value
First observed PG9.3
Present in PG9.3–19 Beta 3
Removed in No
Introduction commit 6f60fdd7015b — Improve replication connection timeouts.
Commit date 2012-10-11
Discussion

Default history

Measured PG9.0–19 Beta 3 boot defaults
Versions Raw boot_val Unit Human value
PG9.3–19 Beta 3 60000 ms 1 min

How it works

Sets the maximum wait time to receive data from the sending server. A configuration reload applies a new value; existing work already in flight is not retroactively changed.

A standby terminates its receiver after this period without sender data, then reconnects according to recovery behavior. It is failure detection, not an end-to-end failover deadline, and must tolerate expected network pauses.

Monitor and change wal_receiver_timeout together with primary_conninfo, primary_slot_name, restore_command. Validate on the relevant server role and real workload, then use its sighup context to choose session change, reload, or restart; a historical boot default is not the current effective value.

Tuning advice

Tip

Advice. These are workload-specific starting points and must be validated with measurements.

Workload Guidance
OLTP Size wal_receiver_timeout from topology, failover roles, slot/subscription count, and reconnect headroom. Test worst-case primary latency, standby replay, and disk retention before production.
OLAP Read standbys and logical subscribers often see long queries or large transactions. Put explicit bounds on replay/apply and monitor lag, worker saturation, slot restart_lsn, and conflict cancellations.
Small nodes Configure only replication capacity that is actually used. Even a small topology needs bounded timeouts and slot lifecycle; unlimited retention is not reliability.

Pigsty

Values use the fixed 8-vCPU, 32-GiB, 100-GiB SSD fixture and render the current Pigsty templates for PG19 Beta 3; this does not assert current Pigsty support for that historical or beta release.

Template Effective value Versus upstream boot Source expression
OLTP 60s same as boot 60s
OLAP 60s same as boot 60s
CRIT 60s same as boot 60s
TINY 60s same as boot 60s
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.3–19 Beta 3 = 60s (dcs); OLAP: PG9.3–19 Beta 3 = 60s (dcs); CRIT: PG9.3–19 Beta 3 = 60s (dcs); TINY: PG9.3–19 Beta 3 = 60s (dcs). Advice, pending human review — Editorial interpretation, pending human maintainer review: the override appears intended to state a one-minute receiver failure-detection window explicitly; confirm it against the current Pigsty templates, hardware fixture, and operational guarantees before publication.

Common pitfalls

  • Changing it on the wrong primary, standby, sender, or subscriber role.
  • Watching only configured bytes/time instead of actual lag, slot position, and worker state.
  • Failing over to a node that lacks the old primary’s capacity or prerequisites.
  • Using infinite waits or WAL retention to hide a failed consumer.

primary_conninfo · primary_slot_name · restore_command · wal_retrieve_retry_interval · hot_standby · wal_receiver_status_interval

References