Re: Unsafe access BufferDescriptors array in BufferGetLSNAtomic()

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tender Wang <tndrwang@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-02-19T00:58:02Z
Lists: pgsql-hackers
On Wed, Feb 19, 2025 at 9:44 AM Michael Paquier <michael@paquier.xyz> wrote:
> On Wed, Feb 19, 2025 at 09:36:35AM +0900, Richard Guo wrote:
> > I plan to push this shortly.  This is arguably a bug, but it hasn't
> > caused any real issues, and nobody has complained about it until now,
> > so I don't think it needs to be back-patched.  Any thoughts?
>
> I can see a point in doing a backpatch to keep the code consistent
> across branches, and this avoids incorrect access patterns when
> copy-pasting this code.

Hmm, fair point.  I will backpatch-through 13.

Thanks
Richard



Commits

  1. Fix unsafe access to BufferDescriptors