Diagnostic step 1
Confirm wal_segment_size on primary and the standby using pg_controldata; if they differ, plan a fresh base backup from the primary.
Generated Oct 22, 2026, 9:30:52 AM
Confirm wal_segment_size on primary and the standby using pg_controldata; if they differ, plan a fresh base backup from the primary.
Take a new base backup from the primary with pg_basebackup and initialize the standby using that backup so control files match the primary, then start streaming replication.
If a full resync is not possible immediately, stop replay, archive corrupted WAL for analysis, and keep the existing standby offline to preserve evidence.
Avoid using pg_resetwal except as a last resort and only with expert guidance — it can cause data loss.
Consider using pg_rewind only if you have a consistent divergence scenario and matching control data; otherwise prefer a fresh base backup.