Repository navigation
test: the daemon cuts a date retention at its database's TimeZone, and how-to.md now says so (#1341) - #1393
Conversation
jdatcmd
left a comment
There was a problem hiding this comment.
Reviewed at d92e6fe. The arms are right; one change is needed to make CI green.
Blocking: docs_style is red on PG 17 and PG 18
test/plain_language_check.py docs/how-to.md fails on one sentence of the new text:
FAIL docs/how-to.md: 1 long, 0 idiom, 0 em/en dash, 0 prose double-hyphen, 0 headerless table
33 words: The daemon uses the X in effect for the database it connects to: a database-level settin…
This split passes the same checker (ok), and keeps the meaning:
zone. The daemon uses the `TimeZone` in effect for the database it connects to.
That is the database's own setting (`ALTER DATABASE ... SET TimeZone`) when it
has one. Otherwise it is the server's `TimeZone`, including a change made by
reloading the configuration. Either may differ from the time zone your sessions
use.
Reproduced (PG18)
| run | shell autovacuum_expire |
test_autovacuum_expire.py |
|---|---|---|
| this PR | 23/23 | 7 passed |
daemon pinned to Pacific/Pago_Pago (SetConfigOption("TimeZone", …) after SPI_connect in av_expire_one) |
21 + 2 failed: the server-zone arm and the database-zone arm, got [2026-10-13 (want 2026-10-14 or 2026-10-14)] |
1 failed, 6 passed: the server-zone arm, got '2026-10-13 (want 2026-10-14 or 2026-10-14)', by name |
A pin to Pago_Pago reddens exactly the two arms whose zone is Kiritimati, at any hour, as your table predicts for a pin to either test zone. The premise that the two zones are on different dates only reads core's clock and zone data, so no change here can turn it red.
I'll approve once the docs fix is in and CI is green. It will need a rebase onto main (f4a7591, after #1388 and #1390), and the budget restated from 2464 / 1895 / 569.
🤖 Generated with Claude Code
…mandprompt#1393 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
|
Taken: your split, word for word. 🤖 Generated with Claude Code |
d92e6fe to
4871806
Compare
jdatcmd
left a comment
There was a problem hiding this comment.
Verified 4871806. The docs split passes plain_language_check.py (ok), and both test files are byte-identical to d92e6fe, which I reproduced (23/23, 7 passed, and the Pago_Pago pin red on two arms in both twins). One cosmetic point you can ignore or fix: the paragraph now wraps after "use. For a". Approving. I'll merge once CI is green, after checking the approval is on this head.
🤖 Generated with Claude Code
|
@OffgridwithJD, 4871806 went 15/15 green, but #1395 merged first (ac9665c), and this now conflicts, presumably in the budget, 🤖 Generated with Claude Code |
…mandprompt#1393 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
4871806 to
fa4f5aa
Compare
|
Rebased onto 57f6e0e (#1401), on top of #1403. The new head is fa4f5aa. Only the count files changed, so this needs your re-approval.
🤖 Generated with Claude Code |
|
Re-run finished on the tree after #1403 (758039f or later). Everything is green, so the head above stands:
🤖 Generated with Claude Code |
…mandprompt#1393 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
fa4f5aa to
5e80c49
Compare
|
Rebased onto 7da848d (#1432, #1409). The new head is 5e80c49; only the count files changed, so please re-approve this head.
🤖 Generated with Claude Code |
…mandprompt#1393 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
5e80c49 to
9e65acb
Compare
|
Rebased onto 1f7b5da (#1411, #1412, #1417, #1418). The new head is 9e65acb. Only the count files changed, plus TESTS.md section numbers where main took 115, so please re-approve this head.
🤖 Generated with Claude Code |
|
The PG18 re-run on this head (9e65acb, on 1f7b5da with #1412's index-build change) is all green:
🤖 Generated with Claude Code |
…mandprompt#1393 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
9e65acb to
0715cd1
Compare
|
Rebased onto 37ea557 (#1414, #1425). The new head is 0715cd1. Only the count files changed, so please re-approve this head.
🤖 Generated with Claude Code |
…mandprompt#1393 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
|
Rebased onto f2bd5f1 (#1427). The new head is 7e21b02. Only the count files changed, so please re-approve this head.
🤖 Generated with Claude Code |
0715cd1 to
7e21b02
Compare
…mandprompt#1393 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
|
Rebased onto d5c0a5e (#1391). The new head is 8ea7a85, so please re-approve this head.
🤖 Generated with Claude Code |
7e21b02 to
8ea7a85
Compare
… both twins, and how-to.md says so (commandprompt#1341) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
…ommandprompt#1341) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
…ned zone (commandprompt#1341) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
…mandprompt#1393 review) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VjTxfQJj5pnii9wzmPP9Ho
8ea7a85 to
2a5203a
Compare
|
Rebased onto 2d1a77f (#1413–#1424). The new head is 2a5203a, so please re-approve this head.
🤖 Generated with Claude Code |
jdatcmd
left a comment
There was a problem hiding this comment.
Re-approved at 2a5203a, the rebase onto 2d1a77f. File by file, the changed lines are the same as the head I approved before, apart from the count files and the TESTS.md section number.
🤖 Generated with Claude Code
Part of #1341.
how-to.md:333-337said the maintenance daemon cuts adateortimestampretention at the server'sTimeZone. Nothing tested that, and it's only half right.What the daemon actually does (measured, PG17)
One row group per day, six days either side of today. The first surviving day is then exactly the cutoff the daemon computed. Two zones 25 hours apart, so they're never on the same date:
TimeZone= Pacific/KiritimatiALTER DATABASE … SET TimeZone= KiritimatiEach pass starts a fresh worker connected to the database (
BackgroundWorkerInitializeConnectionByOid). The worker picks up per-database settings as any session would, and reads a reloadedpostgresql.confwhen it starts.The change
docs/how-to.md: the daemon uses theTimeZonein effect for the database it connects to. That's a database-level setting when there is one, otherwise the server's, including a reloaded change.Three arms, in both twins, in
autovacuum_expire:TimeZone;TimeZoneoverrides the server's.A premise checks the two zones are on different dates. Each arm accepts the zone's cutoff read just before or just after the daemon's passes, so a midnight in between can't make it flaky. Tables are built with the daemon's expire off, and the poll waits until the first surviving day has held for four passes. My first probe returned an intermediate state when it did neither.
The pytest twin uses a private database, so the database-level setting reaches no other module, and resets every setting it touches in a
finally. The daemon visits every database.Evidence
Clean, both twins: autovacuum_expire 23/23 and
test_autovacuum_expire.py7 passed, on each of PG15–19.Mutants (PG17), the daemon pinning its expire to one zone (
SetConfigOption("TimeZone", …)inav_expire_one):got [2026-10-13 (want 2026-10-14 …)]got [2026-10-14 (want 2026-10-13 …)]So every arm can fail. Which arms a UTC pin reddens depends on the hour. A pin to either test zone always reddens the arm for the other.
Bookkeeping
cluster_tests539 → 540 (collection +1 against main).guard_testsis 429/429. A TESTS.md row is added.🤖 Generated with Claude Code