Repository navigation
test: fk_referencing gets its pytest twin, and a referenced table may still be set to a row store (#1341) - #1452
Conversation
3d86357 to
b32d190
Compare
jdatcmd
left a comment
There was a problem hiding this comment.
Approving b32d190.
Measured on PG17: fk_referencing.sh 27/27, and test_fk_referencing.py 27 checks over 5 tests. The census at this head (3640 / 2682 / 958) matches the budget, and suites_not_covered is 218.
Your new over-rejection arm, with my own mutant. I replaced the target test in the conversion guard (if (!pgcolumnar_am_is_columnar(…)) continue;) with nothing, so every SET ACCESS METHOD on a referenced table is refused, heap included. Only the new arm goes red, in both twins: an FK-referenced table may still be set to a row store, got [no (ERROR: cannot convert table "fk_conv_parent" to columnar storage …)]. So the control you added is the one that sees over-rejection, as the PR says.
I took the other three guard mutants from your table.
|
@OffgridwithJD, a correction to my approval of b32d190. I quoted the census as 3640 / 2682 / 958, copied from your description, not measured. The tsv at this head is 3647 / 2687 / 960, and the budget's |
…es ALTER EXTENSION UPDATE (#1341 item 66) Between installing a new library and running ALTER EXTENSION pgcolumnar UPDATE, a database runs the 1.0-alpha5 library over its 1.0-alpha4 catalog. The library deletes from pgcolumnar.retired_group, which that catalog lacks, so DROP TABLE, TRUNCATE and pgcolumnar.vacuum() on a columnar table fail there with 42P01 'columnar metadata table "pgcolumnar.retired_group" does not exist', which names neither the cause nor the remedy. Measured: each refusal changes nothing, reads and writes work throughout, and after the update all three succeed on the same rows. open_columnar_table's error now carries a hint naming the update. docs/installation.md's "If you skipped step 3" shows the error and the hint. Red first, both twins, PG18: native_upgrade_converge gains the window's arms in a database at the previous release's catalog (the newest fixture), and the three refusal arms fail on main with `got [42P01|no-hint]`. test_native_upgrade_converge.py is their partial twin, declared INCOMPLETE; it stages the previous release's base script from test/fixtures as the shell does. Green on 15-19 in both twins. cluster_tests 660 -> 661 by collection; TESTS.md gets section 143. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… still be set to a row store (#1341) test_fk_referencing.py asserts every shell check by name; compare_to_bash grades it as covering all 28 (27 checks on PG17+, and the pre-17 branch's own), and it joins COMPLETE. The conversion guard's over-rejection control converted a table with no foreign key back to heap, so it could not see a guard that refused every SET ACCESS METHOD on a referenced table whatever the target: with the guard's columnar-target test removed, the suite stayed 26/26. A new arm sets the referenced table itself to heap; under that mutant both twins now fail it. cluster_tests 661 -> 666 by collection; TESTS.md gets section 144. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tations of the foreign-key guards (#1341) 28 rows from five-major runs (27/27 on 17-19, 26/26 on 15-16). Dated on PG18 by: the referenced-side refusal removed (5), the guard keyed on the referencing table (8), the conversion refusal removed (8), and the conversion refused whatever the target (1). suites_not_covered 219 -> 218; the census is 3647 rows, 2686 never, 961 dated, restated on main db56168. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b32d190 to
4ee6e1f
Compare
jdatcmd
left a comment
There was a problem hiding this comment.
Re-approving 4ee6e1f, the restate onto main db56168. I compared every commit's patch with the approved stack using git range-diff. The test and source commits are unchanged, and the ledger-seed commits changed only by re-anchoring on #1470. The census at this head matches its budget paragraph, and the counts step consistently. At #1467's head: the guards pass (438), 687 collected (matching the file), and harness_selftest is 1245/1245.
#1341, the twin-less suites (the first of that item's list):
fk_referencing.shhad no pytest twin. This PR adds one, every check by the shell's name, seeds the suite into the ledger, and adds one control the shell was missing.Stacked on #1450, at the top of my chain (#1444 → #1446 → #1448 → #1450). This branch is #1450's head plus two commits.
What changes
test/pytest/test_fk_referencing.py, the twin. It has five tests in a private schema on the shared cluster.compare_to_bash.pygrades it as covering all 28 names (27 checks on 17+, and the pre-17 branch's own), and it joinsCOMPLETE.SET ACCESS METHODon a referenced table, whatever the target.an FK-referenced table may still be set to a row store, runsSET ACCESS METHOD heapon the referenced table itself. Both twins fail it under that mutant.fk_referencingis seeded with 28 rows from five-major runs, and 17 of the 28 rows dated.suites_not_coveredgoes 219 → 218, and the census is 3612 + 28 = 3640 rows, 2671 + 11 = 2682 never and 941 + 17 = 958 dated, matching the tsv. The gate gives rc=0 against origin/main.I also probed a route the suite doesn't take:
ATTACH PARTITIONof an existing columnar table under an FK-referenced parent. It's refused by the same constraint hook (core clones the constraint for the new partition), so it isn't a gap and I added no arm.Red first
Each mutation of the FK guards in
src/columnar_tableam.cwas run one at a time on PG18, through both twins, with the.somd5 printed every time.fk_referencing.shtest_fk_referencing.pyconrelidforconfrelid)an FK-referenced table may still be set to a row storeNever red (11):
Runs
fk_referencing.shtest_fk_referencing.pyAlso measured: the guard half (438 tests), harness_selftest 1245/1245 and docs_style.
cluster_testsgoes 659 → 664 by collection, and TESTS.md gets §144.🤖 Generated with Claude Code