fix: do not let a custom scan hide INHERITS children - #871
Conversation
Premise verified — and it is the most serious of the current batchMeasured on pg18a against
The blast radius is contained — measured, since this is a
|
Correction to my previous comment — I tested my own claim and it failedI wrote that a broader version of this fix, one that also skipped the children, Mutation on your branch: drop Your suite catches it. The #436 partition arm reddens, because an inheritance What survives is much weaker, and I would not block on it: no arm names an check "the Append's members are still columnar scans" \
"$(printf '%s' "$inh_plan" | grep -c 'Custom Scan (PgColumnarScan)')" "2"But it is a readability improvement, not a hole. Treat my earlier paragraph as Everything else in that comment stands and was measured: the premise (heap 5001 Reviewed as OffgridwithJD. Not approving — same account as the author. |
The change is user-visible and shipped without its entry. Every claim in the entry was measured on this branch rather than taken from the pull request summary. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011QP9UpEMdAj814XAPmftAH
I pushed the missing CHANGELOG entry:
|
The change is user-visible and shipped without its entry. Every claim in the entry was measured on this branch rather than taken from the pull request summary. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011QP9UpEMdAj814XAPmftAH
2d37d34 to
253387f
Compare
The #866 / #871 overlap, measured rather than predictedI said in my previous comment that these two would conflict with each other. That Both PRs add an early return to the same guard block in They are independent fixes for independent bugs — |
Co-authored-by: Cursor <cursoragent@cursor.com>
The change is user-visible and shipped without its entry. Every claim in the entry was measured on this branch rather than taken from the pull request summary. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011QP9UpEMdAj814XAPmftAH
253387f to
9410242
Compare
Rebased onto
|
jdatcmd
left a comment
There was a problem hiding this comment.
Approved at 9410242.
Reviewed adversarially: three independent skeptics were pointed at every finding
raised against this PR with instructions to refute it and to default to refuted
when uncertain. Nothing survived. That is a weak result on its own, so I did not
stop there.
The part I would not take on anyone's word is the resolution against merged
#866, because it keeps both the rte->tablesample and the rte->inh guard
in the same block, and a reviewer cannot tell by reading whether the second one
is load-bearing or decoration. So I removed each guard and measured, on the
composed tree (main + this PR + #868 + #874), PG 17.10:
| tree | inheritance |
tablesample |
|---|---|---|
| both guards, as merged | PASS | PASS |
rte->inh neutered, all 3 sites |
FAILED | PASS |
rte->tablesample neutered, all 3 sites |
PASS | FAILED |
Each guard reddens one suite and only that suite. The off-diagonal passes are
the half that makes this evidence rather than noise: they show the mutation is
specific, not a build that breaks everything. Both mutations were asserted to
have applied before building — 3 markers present, 0 original guards remaining,
in each tree — so neither column can be a mutation that silently did not land.
Composition, not the branch. Two individually green branches are not proof
that they compose; this repo has been bitten by that. So the number that matters
is a full PG 17.10 matrix on the merged tree, against a matrix on main
b4f0a456 run in the same isolated prefix:
| verdicts | PASS | SKIP | FAIL | |
|---|---|---|---|---|
main b4f0a45 |
239 | 234 | 5 | 0 |
| main + #871 + #868 + #874 | 241 | 236 | 5 | 0 |
Set difference composed − baseline is exactly estimate_deleted=PASS and
inheritance=PASS, the two suites those PRs add. Baseline − composed is
empty: nothing that passed on main stopped passing. inputs == sum(buckets)
on both sides (234+5=239, 236+5=241), counted from the run output rather than
retyped.
Both runs used a private prefix (/usr/local/pg17_m902*) so no concurrent
make install could overwrite the .so under either arm.
Nits, none blocking, not conditions of this approval: they are on the record in
the review pass and none of them touch behaviour.
Summary
PgColumnarSetRelPathlistand the ungrouped vector-aggregate path both ran on a legacy inheritance appendrel (RELKIND_RELATIONwithrte->inh). A scan added there reads only the parent's storage.SELECT count(*) FROM parentreturned 1 against a heap mirror of 5001 (parent 1 row, child 5000), from a plan with no Append. Grouped vector aggregation already refused this shape.rte->inhis set. Children and the parent-as-member still get a custom scan (inhis false there). Declarative partitions are unchanged (RELKIND_PARTITIONED_TABLE).Test plan
test/inheritance.shon PostgreSQL 18 incusor-2604(INHERITS matches heap; Append in the plan; partitioned parent still usesPgColumnarScan)SELECT */count(*)/ filtered queries on anINHERITSparent with data in both parent and childPARTITION BYparent still returns every row viaPgColumnarScanon the partitionMade with Cursor