Repository navigation
test: refusals and the month/year path in the partition lifecycle and tiering, in both twins (#1341) - #1350
Conversation
|
@OffgridwithJD, I reviewed 5d0b734 and reproduced two of the claims on PG18 with both pytest files:
One difference from your table: on the pytest side, the date key with a 6-hour width gets The other arms read well. Requiring the message, not only the SQLSTATE, on the width arm is the right call, since the 1000-partition cap answers 22023 too. It needs a rebase before I approve. #1342 and #1349 merged, so main is at 2316 rows / 1796 never. With your nine dated rows that becomes 2325 / 1796. #1346 and #1347 are queued too, so whoever lands later restates from main. I'll approve and merge on the rebased head once CI is green. |
5d0b734 to
cbaa1bd
Compare
|
Rebased onto d0ae0b1 (#1349 and #1342 merged); the head is now cbaa1bd. The two suites and their pytest twins are byte-identical to the tested 5d0b734. The ledger is redone from main's (2316/1796/520): 2325 / 1796 / 529, all nine new rows dated, with the budget restated. Gate: census agrees, ceiling 246. |
|
@OffgridwithJD, I checked cbaa1bd against the head I reviewed (5d0b734): all four test files are identical, so the review stands. Your restated budget (2325 / 1796) is right for d0ae0b1. One more rebase, sorry: #1346 merged since. Main is now d926b62 at 2321 / 1798, so with your nine dated rows it becomes 2330 / 1798. Your PR doesn't change #1347 is also waiting on a re-approval; whichever lands second restates. |
jdatcmd
left a comment
There was a problem hiding this comment.
Approving the content at cbaa1bd. The test files are identical to 5d0b734, which I reviewed. On PG18 I reproduced the timestamp-key and missing-server claims: clean 5 passed, and each mutant reddened its own arm.
Not mergeable yet: check_ledger_budget.txt conflicts with main (74cde39), whose census #1346 moved to 2321 / 1798. Please rebase and restate from a recount; with your nine dated rows I expect 2330 / 1798. Once CI is green on the new head, I'll check only the ledger and budget, re-approve and merge.
cbaa1bd to
c0311ab
Compare
|
@jdatcmd, rebased onto main 74cde39 (#1346 and #1352 merged). The new head is c0311ab, replacing cbaa1bd.
Whichever of #1347, #1354, #1351 and #1353 lands first, the others restate from main. |
|
@jdatcmd, rebased again, onto 95b4112 (#1347 merged). The new head is 6728793, replacing c0311ab.
Whichever of this and #1354 lands second restates. |
c0311ab to
6728793
Compare
… tiering, in both twins (commandprompt#1341) Nine behaviours no arm exercised, each now an arm in both twins: partition_create_ahead, before any DDL: - a zero or negative width, or a negative lead (22023); - a parent not RANGE-partitioned on one column: LIST, two columns, not partitioned at all (55000); - a key that is not a timestamp: date, an integer type (55000); - a month or year width starts at this month's first and steps by the calendar, for a timestamptz and a timestamp key. partition_drop_plan refuses a NULL cutoff, in both overloads (22023). tier_partition refuses a server that does not exist before anything moves. pgcolumnar.tier_fault_after refuses a value that is not a step name. The width arms want the message as well as the code: without the width check, a zero width never moves the counting loop on and the 1000-partition cap answers with the same 22023. The relation in a message is named the way the function names it, schema-qualified under its own search_path. Red first on PG17, each mutation removing the branch its arm tests, in both twins. Each reddens only its own arm: - no width check: `22008 stride must be greater than zero` and `ok: 0`; - no RANGE check: 42P16 from ATTACH, 42P17 for an unpartitioned table; - no key-type check: a date key silently gets partitions (`ok: 2`); - no month branch: 0A000 from date_bin; - no NULL-cutoff check: `0|0`, an empty plan; - no missing-server branch: 42704 from core, but the file is written; - an open check hook: the bogus SET succeeds. Clean: partition_lifecycle 59/59 on each of 15-19; tier_partition 73/73 on 18-19, 72 + 1 named SKIP on 15-17; both pytest files green on each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@jdatcmd, rebased onto e848f8f (#1354 merged). The new head is 7d7d634, replacing 6728793. Your approval is on cbaa1bd, so this needs a re-approval before it can merge.
If you merge this before #1351, #1353 or #1355, those three restate after it. |
6728793 to
7d7d634
Compare
jdatcmd
left a comment
There was a problem hiding this comment.
Re-approving 7d7d634.
- Ledger: a recount gives 2336 / 1803, which agrees with
checks_never_observed_red 1803. No duplicate keys, and no datedpremise:row, so #1347's gate rule is satisfied. - Patch: all four test files are byte-identical to cbaa1bd, the head I reviewed and reproduced.
- Database-free set: 429 passed on this head.
Merging.
Part of #1341: the items in my features that I claimed there. Nine arms, in both twins, each red first under a mutation that removes the branch it tests.
The arms
partition_create_ahead:0 seconds,-1 dayandahead => -1each give 22023 with its own message, and nothing is createddatekey and an integer key: 55000, nothing created[first of a month, + 1 month), starting this month+ 1 yearpartition_drop_plan(…, NULL::timestamptz)and(…, NULL::timestamp): 22023tier_partition: 42704, rows unchanged, still a local table, no fileSET pgcolumnar.tier_fault_after = 'exprot': 22023Two design points
regclassunder its ownsearch_path = pg_catalog, pg_temp, so it printspublic.lp. The wants computeformat('%I.%I', …)in the session, rather than hard-coding a name that only matches by accident. My first run had it the other way, and every clean run caught it.Red first (PG17, both twins; each mutant reddens only its own arm)
22008 stride must be greater than zero(twice) andok: 042P16from ATTACH (LIST, two columns),42P17for the plain tableok: 2: the date-keyed parent silently got partitions;22P02for the integer0A000fromdate_bin, on all three arms0|0: an empty plan, no error…|r|file)okClean:
partition_lifecycle59/59 on each of 15–19;tier_partition73/73 on 18–19, and 72 + 1 named SKIP on 15–17 (as on main). Both pytest files pass on each.compare_to_bash: partition_lifecycle 51 literal + 4 template matches, tier_partition 50 + 6, 0 missing.shellcheck -S warningis clean. No pytest tests added (new arms inside existing tests), so the counts don't move.Ledger
Nine new rows, all dated by the mutations above (each merged with
--target): rows 2313 → 2322, andchecks_never_observed_redstays 1797. Gate against origin/main: census agrees, ceiling 246. None of the new rows is apremise:, so #1347's rule has nothing to say about them.Left on #1341
The "run as the caller" item for these functions is a design question, not a missing arm, so I've left it open there.
Overlap: #1342, #1346 and #1347 also move the budget. Whichever merges later restates it.
🤖 Generated with Claude Code