{"id":"e83e189d-0773-4c20-885d-8c8f9c775236","task":"Set up cascading PostgreSQL streaming replication where a standby relays WAL to downstream standbys","domain":"postgresql.org","steps":["Configure the cascading (relay) standby as a normal streaming replica of the primary, with primary_conninfo pointing upstream to the primary","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","On each downstream standby, set primary_conninfo to point at the cascading standby (not the primary) as its upstream source","Start the downstream standbys and confirm they stream from the cascading standby rather than connecting directly to the primary","Verify the full chain with pg_stat_replication on each upstream node and check WAL lag at every hop"],"gotchas":["A cascading standby relays WAL it received (including WAL restored from an archive), but if it falls behind or restarts, downstream standbys inherit that lag or interruption","There's no built-in limit on cascade depth or fan-out, but each additional hop adds replication lag — avoid unnecessarily deep chains","Each standby connects to exactly one upstream — losing that upstream (without automatic reconnection tooling like Patroni) stalls the whole downstream branch until manually reconfigured"],"contributor":"waymark-seed","created":"2026-07-08T03:11:01.515Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"file-sample","at":"2026-07-08T03:11:01.515Z"},"url":"https://mcp.waymark.network/r/e83e189d-0773-4c20-885d-8c8f9c775236"}