Repository navigation
test: sorted_projection gets its pytest twin, its index lookups read the index, and each refusal must be its own (#1341, #1339) - #1506
Merged
Conversation
…dium projections assert their plans (#1341, #1339) test_native_fetch_bigcap.py carries all 15 checks by the shell's name in two tests, measuring buffers as the shell's awk sums them. Two premises are new, in both twins: the narrow (sum(tag)) and medium (m1 || m2 || m3) projections are fetched through an index scan. Only the payload query's plan was asserted. Both plan as Index Scans today, so these guard against a planner change rather than fix a red. FORCE_INDEX also turns the custom scan off, which enable_seqscan does not (#1339). Measured and left alone: - "the fetched rows are the right rows" compares an unforced read with an ORDER BY id LIMIT 10 read, which take different paths, so it reddens when the deferred decode corrupts a column (shell and twin). Forcing both sides through the index made it agree with itself, so it stays as it was. - the two #433 ratios do not move when the cache misses every lookup or the cap drops every column, because those re-read only the projected columns. #433's own regression re-read the group's raw bytes per fetch, and there is no single-gate mutation for that here. COMPLETE gains native_fetch_bigcap. TESTS.md section 173, cluster_tests 742 -> 744. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…by a deferred-decode mutation (#1341) The suite had no rows. suites_not_covered 193 -> 192; census 4347 rows / 3031 never / 1316 dated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"the primary key finds a moved row at its new key, and not at its old one, as on heap" forced the index with enable_seqscan off alone, which leaves the columnar custom scan on. Measured: with pgcolumnar_index_fetch_tuple finding no row, the arm stayed green, because the columnar parent was answered by its partitions' custom scans. IDX now also turns the custom scan off, and a premise asserts the columnar lookup reads the primary key. It plans as an Index Only Scan, which on a columnar table still asks each row whether it is live, so the premise accepts either index node. With the same mutation the arm is now red, in both twins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…te-key arms are dated (#1339) Census 4348 rows / 3029 never / 1319 dated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the index, and each refusal must be its own (#1341, #1339) test_sorted_projection.py carries all 29 checks by the shell's name in three tests. Under each of four mutations the twin reddens exactly the shell's set: the post-sort reindex removed, the compaction not sorting, and vacuum_sorted's columnar check removed. Three shell changes, each measured red first: - "index point lookup after sort" set only enable_seqscan off. With the reindex removed, so the index points at the old row numbers, it stayed green: it never read the index. The lookups now turn the custom scan off, with a premise each that they read t_col_id_idx (an Index Scan or, for the count, an Index Only Scan). - "reject non-columnar table" counted any error. With vacuum_sorted's columnar check removed, the heap table still raised -- XX001, reading the heap's file as columnar storage -- and the arm stayed green. Each refusal now requires its own SQLSTATE (42809, 42703, 22023, 42883). - expect_error recorded a red as "<label> (expected error)", a name the passing run never records, so the ledger's row could not be dated by it. It records under the label. COMPLETE gains sorted_projection, and its literal tables join the loop-reader guard's list. TESTS.md section 174, cluster_tests 744 -> 747. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… vacuum_sorted mutations (#1341) The suite had no rows. suites_not_covered 192 -> 191; census 4377 rows / 3053 never / 1324 dated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 16, 2026
jdatcmd
approved these changes
Oct 16, 2026
jdatcmd
left a comment
Collaborator
There was a problem hiding this comment.
Approve, at 332435e (its own commits, on #1504).
My own mutant, different from your three: vacuum_sorted's unknown-column refusals raise 22023 instead of 42703 (all four ERRCODE_UNDEFINED_COLUMN sites in columnar_vacuum.c). PG17:
- shell:
reject unknown column: got [22023] want [42703]; - pytest: the same.
That's what the per-refusal SQLSTATE buys. The old "any error" form would have stayed green under it. The (expected error) naming fix, recording a red under its own label, is the right one too: a name the passing run never records can't be dated.
Collaborator
|
@OffgridwithJD, merging #1506 now: approved at 332435e, 15/15 green, CLEAN. |
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.
@jdatcmd The sixth #1339 custom-scan audit entry, done as a twin PR because
sorted_projection.shhad none. Stacked on #1504 (#1503 → #1504 → this). This PR's own commits are the top two.Three shell defects, each measured red first
columnar_vacuum.c), so the index points at the old row numbersvacuum_sorted's columnar check removedXX001reading the heap's file as columnar storageexpect_errorarm going red"<label> (expected error)", a name the passing run never records, so its ledger row could never be datedFixes:
t_col_id_idx. The count plans as an Index Only Scan, so the premise accepts either index node.The twin
All 29 checks by the shell's name, in three tests, porting
pgc_check_ordered_oracleand the set and sequence hashes. Under each mutation (reindex removed, no sort, columnar check removed) it reddens exactly the shell's set. The no-sort mutation also reddens the json refusal, because that refusal is raised by setting up the sort.Five-major runs at head: 29/29 for the shell and 29/29 for the twin, on each of 15–19.
Ledger
Census 4377 / 3053 never / 1324 dated (on #1504's 4348 / 3029 / 1319), with suites_not_covered 192 → 191. 5 of the 29 checks are dated. The gate gives rc 0. Collection gives
cluster_tests 744 -> 747, and TESTS.md gets §174. The loop-reader list gains the suite, the grader passes 40/40, and the guards 438/438.That leaves
audit.shas the last audit entry.🤖 Generated with Claude Code