Skip to content

Add check-copy-stall.sh COPY stall diagnostic#65

Open
teknogeek0 wants to merge 1 commit into
mainfrom
feat/migration-diagnostics
Open

Add check-copy-stall.sh COPY stall diagnostic#65
teknogeek0 wants to merge 1 commit into
mainfrom
feat/migration-diagnostics

Conversation

@teknogeek0

Copy link
Copy Markdown
Contributor

Adds a read-only, target-side diagnostic for a stalled or slow pgcopydb COPY during the initial copy phase.

What

check-copy-stall.sh answers the two questions that matter when a migration looks stuck:

  1. Is anything actually lock-blocked (and who holds it)?
  2. Where is time being spent — source feed, disk IO, WAL, or a lock — and is data still landing?

Sections: blocking tree, ungranted locks, wait-event summary, active COPY progress, running vacuums, idle-in-transaction sessions, and an optional throughput sample (--no-sample / --sample-secs N).

Notes

  • Read-only: connects with default_transaction_read_only=on plus statement/lock timeouts; makes no modifications to the target.
  • Documented in README.md and AGENTS.md.

No automated test suite in this repo; validated by syntax check and code inspection.

Read-only target-side diagnostic: blocking tree, ungranted locks, wait-event
summary, active COPY/vacuum progress, idle-in-transaction sessions, and an
optional throughput sample. Documents it in README and AGENTS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant