Database Replication Manager Skill for PostgreSQL WAL Lag
Compare PostgreSQL send and replay positions without confusing bytes behind with elapsed time.
中文Install in Claude Code
Use your PostgreSQL test primary and replica or a synthetic pg_stat_replication snapshot with approved monitor access.
- Get the complete `plugins/database/database-replication-manager/skills/managing-database-replication` directory from the pinned GitHub commit.
- Copy it into the target project's `.claude/skills/`. Check `.claude/skills/managing-database-replication/SKILL.md`, start Claude Code at the project root, and call `/managing-database-replication`.
Example task
Set a sample sent-to-replay difference of 8,192 bytes and take a subsequent snapshot to check whether the replica catches up.What to check
The first report shows 8 KiB of WAL backlog. The next reports the observed change without labeling bytes as seconds.
Original SKILL.md on GitHub · Updated
Frequently asked question
Can pg_wal_lsn_diff be reported directly as seconds?
It measures bytes between WAL positions. A time measure needs timestamps or its own defined observation.