| From: | Greg Burd <greg(at)burd(dot)me> |
|---|---|
| To: | Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com> |
| Cc: | vignesh C <vignesh21(at)gmail(dot)com>, Joao Rito <joaovictor(dot)rito(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, shihao zhong <zhong950419(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Jeff Davis <pgsql(at)j-davis(dot)com>, Alexander Lakhin <exclusion(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Hash index: stop registering pin-only bucket pages in WAL (remove REGBUF_NO_CHANGE) |
| Date: | 2026-11-14 15:02:05 |
| Message-ID: | avh3oZV5zos0gmbp@werk |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hayato, vignesh, Joao,
v11 attached. This is vignesh's v8 as the base, with Hayato's three
comment changes applied and nothing else changed in the code. I built
it and ran it so we have one version that is current, reviewed, and
tested end to end.
What changed since my v10:
- Adopted vignesh's v8 layout as canonical: the merged
061_hash_torn_primary_page.pl, the CRC test as
062_hash_vacuum_insert_crc.pl, the standalone-0001 fix, and the
REL15..REL19 back-branch patches for 0001. My earlier 068a/068b
split is gone.
- Applied Hayato's three comment changes to 0002, verbatim:
hashbucketcleanup and _hash_freeovflpage now lead with why replay
needs the cleanup lock, and the hash_xlog_lock_primary_bucket doc is
the shorter version.
Testing, rebased on current master (70c4a57b64d):
- Full recovery suite, autoconf UBSan build
(-O2 -fsanitize=alignment,undefined -fno-sanitize-recover=all) with
TEMP_CONFIG=src/tools/ci/pg_ci_base.conf and
PG_TEST_EXTRA=wal_consistency_checking, run in parallel: 61 files,
838 tests, all pass. 061 and 062 both pass.
- 0001 alone: 061_hash_torn_primary_page passes 9/9, so the fix and
its test are committable separately, as vignesh intended.
- The REL15..REL19 0001 patches apply to their branches. I built
REL19 under the same UBSan flags and its 061 passes 9/9. The
back-branch 0001 is unchanged from vignesh's v8; Hayato's comments
are all in 0002, which is master only.
Thanks Joao for retesting v8 on ext4 and confirming the pg_waldump
segment-size fix holds.
On 0003: it is meant to be pushed. It is the recovery test that pins
down the CRC window 0002 closes, through the injection point in
XLogRecordAssemble that fires after the record CRC is computed and
before the record is copied. Without 0002 it fails with "incorrect
resource manager data checksum"; with it the same interleaving replays
cleanly. I kept it as its own commit, but it is fine to squash it into
0002 on commit if you would rather the fix and its test land together.
0001 (the torn-page redo fix) stands alone and is back-patchable;
0002-0004 are master only.
Greg
| Attachment | Content-Type | Size |
|---|---|---|
| v11-0004-Remove-REGBUF_NO_CHANGE.patch | text/x-patch | 5.2 KB |
| v11-0001-Fix-hash-index-redo-reading-a-torn-primary-bucke.patch | text/x-patch | 17.2 KB |
| v11-0003-Add-a-recovery-test-for-the-hash-WAL-pin-only-bu.patch | text/x-patch | 12.0 KB |
| back-patches.tgz.nocfbot | application/octet-stream | 7.0 KB |
| v11-0002-Don-t-register-pin-only-primary-bucket-pages-in-.patch | text/x-patch | 25.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alberto Piai | 2026-11-14 15:50:50 | Re: Adding a stored generated column without long-lived locks |
| Previous Message | Alexander Lakhin | 2026-11-14 14:00:01 | Re: 041_checkpoint_at_promote.pl might fail due to race condition on child kill |