| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | Greg Burd <greg(at)burd(dot)me> |
| Cc: | vignesh21(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, michael(at)paquier(dot)xyz, pgsql(at)j-davis(dot)com, exclusion(at)gmail(dot)com |
| Subject: | Re: Hash index: stop registering pin-only bucket pages in WAL (remove REGBUF_NO_CHANGE) |
| Date: | 2026-10-31 11:32:34 |
| Message-ID: | CAA4eK1+kdOjo3K9mTUbq-ZM+sLrbOzBREpPNr-fwFgxJGUCmbg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, Oct 30, 2026 at 10:51 PM Greg Burd <greg(at)burd(dot)me> wrote:
>
> On Fri, 30 Oct 2026 17:18:34 +0530, vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> > The patches change the WAL records, and XLOG_PAGE_MAGIC cannot be
> > bumped in a minor release, so I looked at what happens if they are
> > backpatched. I built the base REL_18_STABLE, REL_18 + 0001, + 0002,
> > and + 0003 (attached, adapted for REL_18: the squeeze code there lacks
> > the locals present on master, so 0001 computes mod_wbuf itself) and
> > ran them against each other with streaming replication and crash
> > recovery, with wal_consistency_checking = 'hash' and VACUUM of hash
> > indexes in which every shape of the three records occurs.
>
> On your back-branch question: I don't think we should back-patch this.
>
+1. I also think this should be a master-only change helping us to
remove the use of REGBUF_NO_CHANGE from hash indexes. Also, the below
change to make it work on back-branches appears too hacky to me.
+#if HASH_WAL_REGISTER_BUCKET_PAGE
+ /* for standbys that predate the block number, see hash_xlog.h */
+ if (!xlrec.is_primary_bucket_page)
+ {
+ uint8 flags = REGBUF_STANDARD | REGBUF_NO_IMAGE | REGBUF_NO_CHANGE;
+
+ XLogRegisterBuffer(0, bucket_buf, flags);
+ }
+#else
--
With Regards,
Amit Kapila.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-10-31 11:36:43 | Re: Fix error handling in pg_flush_data() and FilePrefetch() |
| Previous Message | Heikki Linnakangas | 2026-10-31 11:07:33 | Re: [PATCH] pg_upgrade: handle failed nonblocking connects on Windows |