Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Change xl_hash_vacuum_one_page.ntuples from int to uint16
Date: 2023-02-17 03:00:09
Message-ID: CAA4eK1LmYW0mHEk0fN+Nt7giBJfOx6s1DoLc2KRXVNvoGQ=3Cw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Feb 16, 2023 at 8:39 PM Drouvot, Bertrand
<bertranddrouvot(dot)pg(at)gmail(dot)com> wrote:
>
> On 2/16/23 1:26 PM, Drouvot, Bertrand wrote:
> > Hi,
> >
> > On 2/16/23 12:00 PM, Amit Kapila wrote:
> >> I think this would require XLOG_PAGE_MAGIC as it changes the WAL record.
> >>
> >
> > Oh, I Was not aware about it, thanks! Will do in V2 (and in the logical
> > decoding on standby patch as it adds the new field mentioned above).
> >
> >> BTW, how about a commit message like:
> >> Change xl_hash_vacuum_one_page.ntuples from int to uint16.
> >>
> >> This will create two bytes of padding space in xl_hash_vacuum_one_page
> >> which can be used for future patches. This makes the datatype of
> >> xl_hash_vacuum_one_page.ntuples same as gistxlogDelete.ntodelete which
> >> is advisable as both are used for the same purpose.
> >>
> >
> > LGTM, will add it to V2!
> >
> Please find V2 attached.
> The commit message also mention the XLOG_PAGE_MAGIC bump.
>

Thanks, I was not completely sure about whether we need to bump
XLOG_PAGE_MAGIC for this patch as this makes the additional space just
by changing the datatype of one of the members of the existing WAL
record. We normally change it for the addition/removal of new fields
aka change in WAL record format, or addition of a new type of WAL
record. Does anyone else have an opinion/suggestion on this matter?

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2023-02-17 03:21:14 Re: odd buildfarm failure - "pg_ctl: control file appears to be corrupt"
Previous Message Tomas Vondra 2023-02-17 02:50:54 Re: BRIN indexes vs. SK_SEARCHARRAY (and preprocessing scan keys)