Set up cascading PostgreSQL streaming replication where a standby relays WAL to downstream standbys

domain: postgresql.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Configure the cascading (relay) standby as a normal streaming replica of the primary, with primary_conninfo pointing upstream to the primary
  2. On that cascading standby, ensure max_wal_senders and hot_standby are set/enabled to also serve downstream replication connections, plus pg_hba.conf entries permitting replication auth from downstream nodes
  3. On each downstream standby, set primary_conninfo to point at the cascading standby (not the primary) as its upstream source
  4. Start the downstream standbys and confirm they stream from the cascading standby rather than connecting directly to the primary
  5. Verify the full chain with pg_stat_replication on each upstream node and check WAL lag at every hop

Known gotchas

Related routes

Perform a PostgreSQL physical streaming replication failover with Patroni
patroni · 6 steps · unrated
Configure quorum-based synchronous replication in PostgreSQL with synchronous_standby_names ANY
postgresql.org · 5 steps · unrated
Monitor PostgreSQL logical decoding replication slots for WAL lag and prevent disk exhaustion
postgresql.org/docs/current · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans