Database Transaction Monitor Skill for PostgreSQL Lock Waits
Inspect PostgreSQL transactions and map a waiting session to its actual blocker in a local demonstration.
中文Install in Claude Code
Use your disposable PostgreSQL database and three psql sessions. The example touches one synthetic row.
- Get the complete `plugins/database/database-transaction-monitor/skills/monitoring-database-transactions` directory from the pinned GitHub commit.
- Copy it into the target project's `.claude/skills/`. Check `.claude/skills/monitoring-database-transactions/SKILL.md`, start Claude Code at the project root, and call `/monitoring-database-transactions`.
Example task
Keep session A's update of lock_demo open, let B update the same ID, and inspect B using pg_blocking_pids in the third session. Roll back the test sessions afterward.What to check
The report names A as B's blocker. The relationship disappears after the test transactions finish, leaving no lasting row change.
Original SKILL.md on GitHub · Updated
Frequently asked question
Does query_start measure transaction age?
Use xact_start for transaction age and query_start for the current query's duration.