Re: pg_walfile_name_offset can return inconsistent values

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: pg_walfile_name_offset can return inconsistent values
Date: 2023-11-09 23:35:42
Message-ID: ZU1szphQ8DZxb7CU@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 10, 2023 at 08:25:35AM +0900, Michael Paquier wrote:
> On Thu, Nov 09, 2023 at 04:14:07PM -0500, Bruce Momjian wrote:
> > Attached is the full patch that changes pg_walfile_name_offset() and
> > pg_walfile_name(). There is no need for doc changes. We need to
> > document this as incompatible in case users are realying on the old
> > behavior for WAL archiving purposes. If they want the old behavior they
> > need to check for an offset of zero and subtract one from the file name.
>
> FWIW, I am not really convinced that there is a strong need to
> backpatch any of that. There's a risk that some queries relying on
> the old behavior suddenly break after a minor release, and that's
> always annoying. A HEAD-only change seems like a safer bet to me.

Yes, this cannot be backpatched, clearly.

> > Can someone check that all other calls to XLByteToPrevSeg() are correct?
>
> On a quick check, all the other calls use that for end record LSNs, so
> that looks fine.

Thank you.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Only you can decide what is important to you.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2023-11-09 23:36:55 Re: Side effect of CVE-2017-7484 fix?
Previous Message Michael Paquier 2023-11-09 23:25:35 Re: pg_walfile_name_offset can return inconsistent values