Repository navigation
fix(pgmq): fix drop_queue overload ambiguity - #2539
Merged
brainrake merged 3 commits intoOct 13, 2026
Merged
Conversation
pgmq.drop_queue has shipped two overloads since 1.5.0, drop_queue(text) and drop_queue(text, boolean), which breaks any unqualified reference to the function (what #2400 hit). after-create.sql now always detaches and recreates both signatures explicitly instead of branching on extversion, and keeps both attached to the extension so DROP EXTENSION cleanly removes both - no orphans left behind for a later CREATE EXTENSION to collide with. Reattaching both exposed a second bug: pgmq's own 1.4.5->1.5.0 upgrade script does a plain DROP FUNCTION IF EXISTS on the 2-arg signature, which can't remove an extension member. Patched that script (0002-detach-drop_queue-shim-before-drop.patch) to detach it first, so ALTER EXTENSION UPDATE still works from a freshly-installed 1.4.4. Verified via NixOS VM test across pgmq 1.4.4/1.5.1, the full 1.4.4->1.5.1->1.13.0 upgrade chain, and a DROP EXTENSION cycle. Refs: FDBKIN-8821 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
PostgreSQL Extension Dependency Analysis: PR #2539
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 #2539
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 |
brainrake
marked this pull request as ready for review
October 8, 2026 08:53
imor
approved these changes
Oct 8, 2026
Package version diffCompares built package versions in legacyPackages between this PR and the tip of the base branch, per system. aarch64-linux: Closure size: 73 -> 73 (2 paths added, 2 paths removed, delta +0, disk usage +0B).x86_64-linux: Closure size: 74 -> 74 (2 paths added, 2 paths removed, delta +0, disk usage +0B). |
brainrake
enabled auto-merge
October 10, 2026 23:26
encima
approved these changes
Oct 13, 2026
brainrake
deleted the
martonboros/fdbkin-8821-pgmq-drop-queue-overload
branch
October 13, 2026 06:49
brainrake
added a commit
that referenced
this pull request
Oct 13, 2026
pgmq moved GitHub orgs: tembo-io/pgmq -> pgmq/pgmq, reflected in the fetchFromGitHub owner and homepage. Drop the Supabase-only shim that injected pgmq._extension_exists into the 1.5.0->1.5.1 upgrade script - upstream defines it itself (CREATE OR REPLACE FUNCTION) from 1.5.1->1.5.2 onward, and nothing else in this repo calls it. Add 1.13.0 (latest) to versions.json. Keeps 1.4.4/1.5.1 for pinned-version installs/restores. This makes 1.13.0 the shipped default_version. Updated pgmq/z_*_ext_interface expected-output snapshots for 1.13.0's expanded function surface and the drop_queue fix already on develop (#2539). Refs: MPG-110 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Supersedes supabase/postgres#2433, reverted in supabase/postgres#2532. That design merged both overloads into one function, which broke
ALTER EXTENSION UPDATEfrom 1.5.1 onward.This version instead keeps both
drop_queue(text)anddrop_queue(text, boolean)as separate, extension-owned functions:extversion.DROP EXTENSIONcleans up fully, no orphan left for a laterCREATE EXTENSIONto collide with.1.4.5->1.5.0upgrade script (0002-detach-drop_queue-shim-before-drop.patch) to detach the 2-arg signature first, since a plainDROP FUNCTION IF EXISTScan't remove an extension member - otherwiseALTER EXTENSION UPDATEfrom a fresh 1.4.4 install would abort.Verified via NixOS VM test across pgmq 1.4.4/1.5.1, the full 1.4.4->1.5.1->1.13.0 upgrade chain, and a
DROP EXTENSIONcycle. No pg_regress snapshot changes needed - current develop's checked-in snapshots already match this shape.supabase/postgres#2431 (pgmq 1.13.0 version bump) depends on this.
FDBKIN-8821