Repository navigation
fix(pgmq): fix drop_queue overloading bug - #2433
Merged
Merged
Conversation
brainrake
marked this pull request as draft
September 8, 2026 00:23
brainrake
added a commit
that referenced
this pull request
Sep 8, 2026
PostgreSQL Extension Dependency Analysis: PR #2433
SummaryNo extensions had dependencies with MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Extension DependenciesPostgreSQL 17 Extension DependenciesOrioleDB 17 Extension Dependencies |
PostgreSQL Package Dependency Analysis: PR #2433
SummaryNo packages had MAJOR version updates. Full Analysis ResultsPostgreSQL 15 Dependency ChangesExtracting PostgreSQL 15 dependencies...
Runtime Closure Size
Raw Dependency ClosurePostgreSQL 17 Dependency ChangesExtracting PostgreSQL 17 dependencies...
Runtime Closure Size
Raw Dependency Closure |
This comment has been minimized.
This comment has been minimized.
Two drop_queue overloads collapse into one merged drop_queue(text, boolean), same as verified in the NixOS test.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The unchanged Multigres-OrioleDB expected output still contains both overloads and will fail its interface regression test.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Fixes pgmq setup failures caused by overloaded drop_queue signatures.
Changes:
- Replaces historical overloads with one defaulted two-argument function.
- Adds regression coverage for oldest/newest pinned pgmq versions.
- Updates extension-interface snapshots.
File summaries
| File | Description |
|---|---|
ansible/.../pgmq/after-create.sql |
Merges drop_queue overloads. |
nix/ext/tests/pgmq-drop-queue-overload.nix |
Adds regression testing. |
nix/tests/expected/pgmq.out |
Updates pgmq function snapshot. |
nix/tests/expected/z_15_ext_interface.out |
Updates PG15 interface snapshot. |
nix/tests/expected/z_17_ext_interface.out |
Updates PG17 interface snapshot. |
nix/tests/expected/z_orioledb-17_ext_interface.out |
Updates OrioleDB snapshot. |
nix/tests/expected/z_multigres-17_ext_interface.out |
Updates Multigres snapshot. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
brainrake
enabled auto-merge
September 30, 2026 20:52
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Merging both historical overloads into one extension-owned function broke ALTER EXTENSION UPDATE: pgmq's own 1.5.2->1.6.0 script unconditionally drops drop_queue(text), which no longer existed as its own signature. Instead, keep drop_queue(text) as the sole extension member (matching what pgmq's own upgrade chain expects to find) and recreate drop_queue(text, boolean) as a plain, unattached compat shim that just forwards to it - same pattern pgmq itself has used since 1.5.0. A new before-create.sql clears a leftover shim from a prior install, since it isn't an extension member and DROP EXTENSION won't remove it. Verified against the full upgrade chain (1.4.4 -> 1.5.1 -> 1.13.0) and drop/recreate cycles via the NixOS VM tests. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This branch's test file was still asserting the old single-merged-overload design; after-create.sql had already moved on to the split drop_queue(text)/drop_queue(text, boolean) shape. Brings it in line, drops the stray "# python" syntax-highlight comment, and adds a line explaining what each helper actually checks. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
imor
reviewed
Oct 6, 2026
imor
reviewed
Oct 6, 2026
Swallowing every exception around the ALTER EXTENSION detach hid real failures, not just "doesn't exist". Guard with to_regprocedure instead - safe here because before-create.sql already guarantees neither signature can be a stray non-member at this point. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
imor
approved these changes
Oct 7, 2026
This was referenced Oct 8, 2026
brainrake
pushed a commit
to Kranzes/postgres
that referenced
this pull request
Oct 9, 2026
…upabase#2532) This reverts commit b65df05.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2400 unpaused
pgmq.drop_queuehas 2 overloads,(text)and(text, boolean).drop_queue(text)as the sole extension member.drop_queue(text, boolean)as an unattached compat shim that forwards to it. Matches pgmq's own deprecated-shim pattern, soALTER EXTENSION UPDATEkeeps working.before-create.sqlclears a leftover shim from a prior install.Test:
nix/ext/tests/pgmq-drop-queue-overload.nix, covers oldest/newest pinned versions and the full upgrade chain.#2431 rebases on this. Merge here first.
FDBKIN-8821