Repository navigation
fix: partition_drop_plan's drop block carries its body as a literal, not dollar-quoted (#1331 review) - #1334
Merged
Conversation
…rop as planned, red (commandprompt#1331 review) Red on PG17 at 614eb02: the DO block's body ends at the tag inside the quoted partition name, so the statement fails to parse and the partition stays. Not exploitable (jdatcmd's probe), but the plan does not run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…not dollar-quoted (commandprompt#1331 review) A partition name holding $pgcolumnar_drop$ ended the DO block's dollar quote and the statement failed to parse. The body is now format('DO %L', ...), so no name can end it. partition_lifecycle.sh 52/52 on PG17; identical patches in both scripts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ar-quote tag (commandprompt#1331 review) Red against main's dollar-quoted drop (a scratch copy of this file with main's plan text, so only the new arm can fail); green with the fix. compare_to_bash: nothing missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ndprompt#1331 review) Ledger 2311 / 1805, gate rc=0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jdatcmd
approved these changes
Oct 13, 2026
jdatcmd
left a comment
Collaborator
There was a problem hiding this comment.
Approved at 6dc5751. The whole body now goes through %L inside DO %L, so no partition name can end it, and the RAISE message travels as an argument, so its % reaches RAISE untouched.
PG19 at this head: partition_lifecycle.sh 52/52 and test_partition_lifecycle.py 2 passed. That includes the new arm, a partition named with the old dollar-quote tag dropped by the plan as returned, which is red on main's dollar-quoted body.
Ledger: two rows over main's 2309; 1805 never red equals the budget; the never row is a premise. Merging when CI is green on this head.
Collaborator
|
Merging: approved at 6dc5751, and CI is green on that head. |
This was referenced Oct 13, 2026
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.
The follow-up to your nit on #1331. A partition name containing
$pgcolumnar_drop$ended the drop block's dollar quote early. As you found, it can't be exploited, but the planned statement failed to parse, so that partition was never dropped.The fix
The drop block's body is now a string literal:
format('DO %L', body), where the body is built with%Lfor every value. No name can end it. The block refuses with55000while the partition is still attached, exactly as before. The alpha5 install script and the alpha4 upgrade script carry identical patches.The arm, in both twins
A partition named
"dq$pgcolumnar_drop$1"("xq$pgcolumnar_drop$a"in the twin) must drop as planned: every statement runs, the partition is gone, and its sibling stays attached. A premise checks that the fixture's name really holds the tag.failed: DO $pgcolumnar_drop$ …. The pytest twin went red at this same arm, run from a scratch copy that expects main's plan text so that only this arm could fail.partition_lifecycle.sh52/52 andtest_partition_lifecycle.py2/2 on each of PG15–19.native_upgrade_convergeanddocs_stylepass.Ledger: two rows. The arm is dated by the red run on main's drop, and its premise arrives never. 1804 → 1805, and the gate gives rc=0.
The plan text changed shape, so both twins'
gdrophelpers now build the literal form. Every existing arm that compares the plan text passes with them.🤖 Generated with Claude Code