| From: | vignesh C <vignesh21(at)gmail(dot)com> |
|---|---|
| To: | Greg Burd <greg(at)burd(dot)me> |
| Cc: | 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-12 13:23:07 |
| Message-ID: | CALDaNm3hqRWQOoHF=ttSdV+PyuKRPWboEAXmuD44Rgv-a=1N3w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, 12 Nov 2026 at 02:41, Greg Burd <greg(at)burd(dot)me> wrote:
>
> Since the bug is pre-existing, the fix is patch 0001: it stands on its
> own against master, applies with or without the rework, and (the
> back-branch question aside)
We will have to back patch till the PG15 version. I could reproduce
the issue in all the supported branches and the
HotStandbyActiveInReplay changes at [1] fixes the issue.
One small improvement could be done to the patches,
hash_xlog_move_page_contents, hash_xlog_squeeze_page and
hash_xlog_delete all have the below same code, can we use a helper
static function for this:
/*
* The cleanup lock on the primary bucket page serializes replay
* against scans on a hot standby, which pin the page for their whole
* duration. Scans can run only once hot standby accepts queries, so
* until then we need not read or lock the page. Skipping the read
* also sidesteps a torn copy of the page whose repairing full-page
* image comes later in the WAL: that hazard exists only before
* consistency is reached, and queries are accepted only after that,
* so once HotStandbyActiveInReplay() is true any earlier image has
* already been replayed.
*/
if (HotStandbyActiveInReplay())
(void) XLogReadBufferForRedoExtended(record, 0, RBM_NORMAL, true, &bucketbuf)
@Gregory Burd Could you post the 0001 patches for the torn-page issue,
covering branches up to PG15? We can make the patch ready for commit.
Regards,
Vignesh
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Greg Burd | 2026-11-12 13:25:38 | Re: Hash index: stop registering pin-only bucket pages in WAL (remove REGBUF_NO_CHANGE) |
| Previous Message | Kirill Reshke | 2026-11-12 13:21:25 | Re: amcheck: add index-all-keys-match verification for B-Tree |