Postgres Errors Replication Lag

Use when a replica is behind, a replication slot is bloating WAL, or a logical subscription is stuck. Prevents primary disk filling from an inactive slot, discovering lag only at failover time, and ignoring a stuck subscription that never self-heals after a hard conflict. Covers streaming lag monitoring (pg_stat_replication write/flush/replay lag, LSN diff), replication slot bloat (pg_replication_slots), max_slot_wal_keep_size safety cap, logical subscription lag + stuck-subscription recovery (conflict resolution, SKIP), lag root causes. Keywords: replication lag, pg_stat_replication, replay_lag, replication slot, pg_replication_slots, max_slot_wal_keep_size, could not start WAL streaming, subscription stuck, pg_stat_subscription, replica is behind, WAL not being removed, slot bloat, standby lag, logical replication stuck

Impertio-Studio 7b0a18c 4 files · 29.1 KB Updated

File contents

impertio-studio/postgresql-claude-skill-package/tree/main/skills/source/postgres-errors/postgres-errors-replication-lag commit 7b0a18c397

Frequently asked questions

npx skillmds@latest add impertio-studio/postgres-errors-replication-lag