Skip to content

migrator: rename stale deliveries_* pkey indexes to attempts_* - #1031

Merged
alexluong merged 1 commit into
mainfrom
fix/pg-attempts-pkey-name
Aug 11, 2026
Merged

migrator: rename stale deliveries_* pkey indexes to attempts_*#1031
alexluong merged 1 commit into
mainfrom
fix/pg-attempts-pkey-name

Conversation

@alexluong

Copy link
Copy Markdown
Collaborator

The deliveries -> attempts table rename in 000005_denormalize_attempts did not carry the index names with it — Postgres does not rename dependent indexes/constraints on ALTER TABLE ... RENAME. Both the parent partitioned index (deliveries_pkey) and the default partition index (deliveries_default_pkey) are still stale on every Postgres install.

ALTER INDEX ... RENAME is catalog-only: it takes SHARE UPDATE EXCLUSIVE on the index, no lock on the table, and does not block concurrent DML. pg_constraint.conname follows automatically and the partition-index attachment is unaffected.

Refs #1027 (the "unrelated finding" at the end; this does not address partition management).

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@alexluong
alexluong merged commit 1285490 into main Aug 11, 2026
3 checks passed
@alexluong
alexluong deleted the fix/pg-attempts-pkey-name branch August 11, 2026 06:02
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.

2 participants