Diagnostic step 1
Do not drop the replication slot or attempt full resync immediately; preserve WAL to avoid data loss and to allow replay if needed.
Generated Oct 13, 2026, 9:45:52 AM
Do not drop the replication slot or attempt full resync immediately; preserve WAL to avoid data loss and to allow replay if needed.
Increase replica resources temporarily: raise max_worker_processes/max_apply_workers and work_mem on replica and monitor pg_stat_subscription and apply throughput; this can allow the backlog to be consumed without reinitializing (reversible).
Throttle apply by splitting work: if possible, pause logical replication and perform a controlled resync using physical base backup + streaming (pg_basebackup) rather than logical reinitialization; physical restore will bring replica to current WAL position without replaying per-row logical events.
For future schema changes: prefer using 'ALTER TABLE ... ADD COLUMN ... DEFAULT NULL' followed by a background UPDATE batched in small transactions, or use CREATE TABLE + INSERT in batches and swap via partition or rename, to avoid generating massive logical replication change sets.
If logical replication is the only option, test ALTER patterns on a staging copy of the DB with logical replication enabled to measure the generated event volume and tune apply parameters before applying to production; consider using pglogical extension behavior notes if used.