Re: Unsafe access BufferDescriptors array in BufferGetLSNAtomic()

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Tender Wang <tndrwang@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-02-19T00:44:34Z
Lists: pgsql-hackers
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.
--
Michael

Commits

  1. Fix unsafe access to BufferDescriptors