Skip to content

replication_timeout

replication_timeout — Sets the maximum time to wait for WAL replication. Observed in PG9.1–9.2; its last measured boot default is 1 min in PG9.2, with sighup context. It was removed in PG9.3.
Note

Fact — official short description: “Sets the maximum time to wait for WAL replication.”

Identity

Type , Valueinteger
Upstream pg_settings type
Context , Valuesighup
Takes effect after configuration reload
Unit , Valuems
Raw unit
Range , Value02147483647
Raw limits in the last observed version
Enum values , Value
— for non-enum types
Category , ValueReplication / Sending Servers
Upstream classification
Latest boot value , Value60000
1 min

Lifecycle

Fact Value
First observed PG9.1
Present in PG9.1–9.2
Removed in PG9.3
Introduction commit 754baa21f723 — Automatically terminate replication connections that are idle for more than replication_timeout (a new GUC) milliseconds. The TCP timeout is often too long, you want the master to notice a dead connection much sooner. People complained about that in 9.0 too, but with synchronous replication it’s even more important to notice dead connections promptly.
Commit date 2011-03-30
Discussion

Default history

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

How it works

PostgreSQL describes replication_timeout as follows: “Sets the maximum time to wait for WAL replication.” A configuration reload applies the value to the server without a full restart. The atlas measures it in PG9.1–9.2; boot_val is the compiled or initialized baseline, not proof of a running cluster’s effective setting.

This early streaming-replication timeout let a sender terminate an inactive connection. PostgreSQL 9.3 replaced the name with wal_sender_timeout; receiver-side failure detection is separately controlled by wal_receiver_timeout, so migration must preserve which side of the connection owns the timer.

Read it together with wal_sender_timeout, wal_receiver_timeout, wal_receiver_status_interval, max_wal_senders. Check SHOW and pg_settings on the target server, verify the source and pending_restart fields, and compare workload, logs, and resource metrics before and after any change.

Tuning advice

Tip

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

Workload Guidance
OLTP Do not add this retired name to a current OLTP configuration. Translate its intent to the documented successor, test the migration under connection and write concurrency, and remove stale automation that still emits it.
OLAP For an upgrade or analytical estate, inventory every generated configuration before cutover. Map the old control to its successor and compare plans, throughput, WAL, or logging behavior rather than assuming the old numeric value is portable.
Small nodes Delete the obsolete override after recording why it existed. On a small node, prefer the successor’s default until measurements justify a new value; an unknown startup parameter can otherwise stop the server.

Pigsty

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

Template Effective value Versus upstream boot Source expression
OLTP Unmodified
OLAP Unmodified
CRIT Unmodified
TINY Unmodified
Caution

Advice — pending human review. Fact from the current Pigsty template projection: OLTP: PG9.1–9.2 unmodified; OLAP: PG9.1–9.2 unmodified; CRIT: PG9.1–9.2 unmodified; TINY: PG9.1–9.2 unmodified. No Pigsty-specific rationale is inferred from an absent override.

Common pitfalls

  • Treating the measured boot_val for replication_timeout as proof of the effective value on an initialized or managed cluster.
  • Applying a change as though it were immediate while pg_settings reports sighup context.
  • Changing this setting in isolation without checking the linked limits, observability, and rollback path.
  • Copying the removed name into a modern postgresql.conf instead of migrating to its documented successor.

wal_sender_timeout · wal_receiver_timeout · wal_receiver_status_interval · max_wal_senders

References