Repository navigation
test: logical_decoding_cdc_recipe gains its pytest twin, and a rollback that undid nothing no longer passes (#1341) - #1647
Merged
Conversation
OffgridwithJD
force-pushed
the
test/1341-logical-decoding-cdc-recipe-twin
branch
from
October 21, 2026 22:48
57677bb to
e1d08ec
Compare
87 tasks done
OffgridwithJD
force-pushed
the
test/1341-logical-decoding-cdc-recipe-twin
branch
from
October 21, 2026 23:19
e1d08ec to
27b333d
Compare
jdatcmd
requested changes
Oct 22, 2026
jdatcmd
left a comment
Collaborator
There was a problem hiding this comment.
Blocking, and the same defect as #1640's first head: this commit adds a ledger row named after the suite's skip message.
logical_decoding_cdc_recipe logical_decoding_cdc_recipe test_decoding.so is not installed; build contrib/test_decoding 15;16;17;18;19 never -
CI has test_decoding, so the suite never emits that name, and the ledger's orphan scan fails the suites jobs, as it did on #1640. To fix: drop the row and take one from the never count in the budget. #1640's 9109eb2 is the model.
The rest holds. On PG17 at main a1b04ee, with the rolled-back INSERT made a duplicate key (id 1) in a temporary copy of each harness:
| run | result |
|---|---|
| main's shell | 35 passed + 0 failed: the hole |
| this head's shell | 1 failed: "inside the transaction the row was captured and is in the columnar table, before the rollback: got [ERROR: duplicate key value violates unique constraint "events_pkey" …" |
| this head's twin | the same name, refused as a failed query |
Once the row is gone, I'll approve a head whose other files are unchanged.
OffgridwithJD
force-pushed
the
test/1341-logical-decoding-cdc-recipe-twin
branch
2 times, most recently
from
October 22, 2026 04:59
3fbdef6 to
9d5b0ad
Compare
Collaborator
Author
|
@jdatcmd Fixed, at
🤖 Generated with Claude Code |
… guard's (#1341) iceberg_dv.sh gains test/pytest/test_iceberg_dv.py, one check per test under the shell's names, and two holes in the shell are closed, each measured red-first on PG17: - "a manifest/footer offset mismatch is refused (XX001)" read the SQLSTATE alone, and several guards raise XX001. With the offset match removed (the !found refusal skipped), a later XX001 refused the same file and main's shell passed 26/26. Every refusal now reads its own guard's message: refusal() answers the SQLSTATE only when the message carries the guard's phrase, and "<SQLSTATE> (another refusal: ...)" otherwise. - The three "backend still up" checks read SELECT 1, which answers again after crash recovery. With the referenced_data_file check removed a NULL path reaches strcmp and the backend dies on that arm; main passed "backend still up after the DV refusals". They now also read the server log's count of killed backends (crashes/survived, as avro_manifest), and each refusal waits for the server to answer first (await_up), so a crash reddens its own arm and its section's survival check, the same names in both harnesses, and not a timing-dependent tail of collateral. The eight survivor comparisons move to check_text, so an empty oracle no longer matches an empty scan. Measured on PG17, shell then twin as shipped: seventeen mutations, each with the same reds in both (strictgt 7, anyfile/nodup/nov2/noflags/noref/nobigoff 2, the rest 1); 26/26 in each on 15-19. 25 rows dated, 1 never (the survival check after the DV applications, which no mutation crashed). Census 3884 -> 3885 never, 2286 -> 2311 dated, 6196 rows; suites_not_covered 102 -> 101; cluster_tests 2753 -> 2779; TESTS.md §268. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d slot no longer passes (#1341) The pytest twin of test/logical_decoding_source.sh (#754), one check per test, every check by the shell's name, on a private cluster at wal_level=logical. The shell's second slot (pgc_754b) had no heap control. Created after the 5000-row insert, it decoded nothing, and both "and it too emits no decodable change of its own" and "100x the rows does not give 100x the internal records" (0 < anything) passed: main 11/11. A heap table now writes through that slot in the same window and must decode its 5000 inserts ("CONTROL: the second slot decodes the heap table's 5000 inserts"), and the ratio check refuses a slot that carried no internal records. Under that harness mutation both are red in both twins (SAME 2). The pgc_skip message for a missing test_decoding.so was built from pg_config --pkglibdir, so the grader could not read it; it is now a literal, and the twin records the same name (with the plugin moved away on PG17: shell 1 FAIL, twin the same 1 FAIL and 12 declined). No source mutation reddens a check: the claim is that pgcolumnar writes nothing logical decoding can read. A default chunk group of 100 rows still keeps the internal records following groups (114 for 50 groups, under the 10x bound), so it dates nothing. 12/12 shell and 13/13 twin on each of 15-19. Census 3885 -> 3897 never, 2311 dated, 6208 rows (the skip name has no ledger row: it is not a check); suites_not_covered 101 -> 100; cluster_tests 2779 -> 2792; TESTS.md §269. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… longer passes as up (#1341) The twin of test/iceberg_deletes.sh, one test per check under the shell's name. Fixed in both harnesses, measured red-first against main's shell on PG17: - The six "backend still up" checks read SELECT 1, which answers again after crash recovery. With abort() in place of the null-pos refusal, or the partition spec's fields guard removed (a NULL deref, signal 11), main passed the survival check once recovery had finished. They now also read the server log's count of backends killed by a signal, and every reading waits (bounded) for the server, so a crash reddens its own arm and its section's survival check rather than the two arms after it. - Every refusal now also reads its own guard's message: XX001 and 22023 are each raised by several guards here. The oracle comparisons use check_text, so an empty side is not agreement. - "the data file has 5 rows before deletes" reads pgcolumnar's own read_parquet, so it is not a premise (#1339). Twenty-three mutations each redden the same names in shell and twin on PG17; head is 49/49 in both on each of 15-19. The equal-sequence equality check is dated only with both layered guards relaxed: the per-file strict < alone passed, because the pre-skip at the oldest data file's sequence number drops that delete first. Census 3897 -> 3903 never, 2311 -> 2354 dated, 6257 rows; suites_not_covered 100 -> 99; cluster_tests 2792 -> 2841; TESTS.md §270. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…at applied nothing no longer passes (#1341) The twin of test/logical_subscriber.sh, on two private clusters (a heap publisher at wal_level=logical, a columnar subscriber), one check per test, each by the shell's name. Four holes, each measured red-first on main's shell (PG17): - With the insert-only subscription disabled before its UPDATE, main passed 20/20: "skipped by design" and "no apply errors" read after a fixed sleep. An INSERT after the UPDATE must now arrive before either is read. - With no UPDATE sent to the wedge publication, "the error does NOT say only 'row locking'" and "the wedge is real" passed. The first now needs the replication error in the subscriber's log; the second reads "publisher -> subscriber". - With every lock statement failing on a missing table, the three "is not told about replication" checks passed. They now need the generic row-locking error first. - "premise: the second subscription synced before the UPDATE" is reddened by COPY failing in a logical worker, so it is not a premise (#1339) and is dated. The lock loop is unrolled into literal checks so the grader reads each name. Five mutations (hintnoname, nogate, overgate, applyins, syncins) redden the same names in both twins; clean 20/20 on 15-19 in both, and 8/8 head repeats on 17. 20 rows, 16 dated, 4 never. Census 3903 -> 3907 never, 2354 -> 2370 dated, 6277 rows; suites_not_covered 99 -> 98; cluster_tests 2841 -> 2861; TESTS.md §271. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck that undid nothing no longer passes (#1341) The twin of test/logical_decoding_cdc_recipe.sh, every check by the shell's name, one check per test, on a private cluster at wal_level=logical. Like the shell, it extracts the CDC recipe from docs/user-guide.md at run time and executes it. Two holes, both measured on PG17 against main's shell, fixed in both harnesses: - The rollback arm read the capture count and the row only after ROLLBACK, so a rolled-back INSERT that never ran passed both arms. With it made a duplicate key, so the block stopped there, main passed 35/35. A reading inside the transaction, before the rollback, now requires the row both captured and present ("1:1"). Under the same mutation it is red in shell and twin. - "and it saw the same values the table holds" compared two readings with check. With the server stopped before it, "" = "" passed. It is check_text now. The missing-plugin pgc_skip name is a literal the twin records, and the seven recipe-contains premises are unrolled into literal names the grader can read. Five mutations date seven checks, the same names red in both twins on PG17: pgcolumnar_tuple_delete marking nothing (1), the update writing its new version with every column null (1), the update leaving the old version live (3), and two mutations of the guide's recipe: the trigger not firing on DELETE (2), and every non-DELETE captured as an INSERT (4). 36/36 shell and 37/37 twin on each of 15-19. Census 3907 -> 3936 never, 2370 -> 2377 dated, 6313 rows (the skip name has no ledger row: it is not a check); suites_not_covered 98 -> 97; cluster_tests 2861 -> 2898; TESTS.md §272. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OffgridwithJD
force-pushed
the
test/1341-logical-decoding-cdc-recipe-twin
branch
from
October 22, 2026 14:33
9d5b0ad to
4d3ca68
Compare
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 pytest twin of
logical_decoding_cdc_recipe.sh(#754), every check by the shell's name, one check per test. Like the shell, it extracts the CDC recipe fromdocs/user-guide.mdat run time and executes it, on a private cluster atwal_level=logical(pick_port(27); #1640 uses 26).This will be restated into my stack (on top of #1641, after
logical_subscriber), so its counts below are over9d4c9416and will move.Holes, measured on PG17 against main's shell
checkon two readings. Harness mutation: server stopped before it."" = "")check_text, "a side is empty"Also:
pgc_skipname is now a literal (it embeddedpg_config --pkglibdir), and the twin records the same name;Mutations (PG17, shell and twin, SAME reds)
nodelete:pgcolumnar_tuple_deletemarks nothingupdnulls: the update writes its new version with every column nullupdkeepold: the update leaves the old version live (the new version then hits the primary key)nodeltrig: the guide's trigger no longer fires on DELETEupdasins: the guide's capture records every non-DELETE as INSERTNo mutation reddens a premise. I tried a "replaying the feed reproduces the table" check and dropped it: AFTER row triggers re-read the stored row, so the feed and the table never diverged without another check already going red.
Runs and counts
suites_not_covered113 → 112,cluster_tests2454 → 2491, TESTS.md §256.🤖 Generated with Claude Code