pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Xuneng Zhou <xunengzhou@gmail.com>
Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org, Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: BUG #19006: Assert(BufferIsPinned) in BufferGetBlockNumber() is triggered for forwarded buffer
Date: Sun, 10 Aug 2025 09:22:10 +0900
Message-ID: <aJfmMuR0ERs394_c@paquier.xyz> (raw)
In-Reply-To: <CA+hUKG+cK955=G2gWPcK-yeAx1jz5Ln9_q=x9hMVjU=0zH8=dA@mail.gmail.com>
References: <19006-80fcaaf69000377e@postgresql.org>
	<CABPTF7VaW0Hw2-KXoiYFTH40LeUgr06gE5q09sq9LXQPH-vjPA@mail.gmail.com>
	<CA+hUKGK5x5Yekufz7a+Jr1neahwE9cLZn9xt3gSzSZgE=Spjpw@mail.gmail.com>
	<CA+hUKGJyqwQs_kQFB1J=bx4pHMrMcPF8_PgNKyeNFEo+yNvyiQ@mail.gmail.com>
	<CABPTF7WmR2E+1hAS1ZagBi4c23q6jdRJ8wh1q7XK2Cb2JZYVdw@mail.gmail.com>
	<CA+hUKG+gwez63UpPt1-u2rosh3rW3VeKdve23u-=fi9KWAyz5w@mail.gmail.com>
	<CABPTF7XPmJt9K-HdWRCsUy1EqAh1etMU+WfdOwtML3zXw7OKRQ@mail.gmail.com>
	<CA+hUKGLbAyme3mXVYxp3m5knodZACT8ZXyj2AU+WdtdvEfvVQA@mail.gmail.com>
	<CA+hUKG+cK955=G2gWPcK-yeAx1jz5Ln9_q=x9hMVjU=0zH8=dA@mail.gmail.com>

On Sat, Aug 09, 2025 at 04:03:41PM +1200, Thomas Munro wrote:
> Here is a new version of the slightly more ambitious fix, for
> discussion.  I need to figure out if there is any measurable
> performance impact, but from an interface sanity and fragility POV it
> seems infinitely better like this.  I recall being paranoid about
> function call width, but it still fits in 6 registers.  I think
> perhaps the InvalidBuffer-based API might have seemed a shade more
> reasonable before I reworked the pin limiting logic, but once I had to
> start scanning for forwarded buffers after every StartReadBuffers()
> call, I really should have reconsidered that interface.  In other
> words, maybe a bit of myopic path dependency here...
>
> XXX does the change have any measurable performance impact?
> XXX is the single-buffer specialization unaffected due to dead
> code elimination, as expected?
> xxx unused queue entries could potentially be electrified with
> wipe_mem/VALGRIND_MAKE_MEM_NOACCESS, though existing bufmgr.c assertions
> are very likely to reveal any fencepost bugs already
> XXX perhaps we don't need quite so many _npinned <= _nblocks assertions

With all these comments and b421223172a2 already applied, are you sure
that it is a good idea to play with the v18 branch more than
necessary?  We are in a baked beta2 state, and it looks like all these
could qualify as HEAD-only improvements.

Perhaps the open item can be closed then?
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../aJfmMuR0ERs394_c@paquier.xyz/2-signature.asc)
  download

view thread (29+ messages)  latest in thread

Message-ID: <aJfmMuR0ERs394_c@paquier.xyz>
Permalink:  ../aJfmMuR0ERs394_c@paquier.xyz/
Also on:    postgresql.org/message-id/aJfmMuR0ERs394_c@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, thomas.munro@gmail.com, xunengzhou@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: BUG #19006: Assert(BufferIsPinned) in BufferGetBlockNumber() is triggered for forwarded buffer
  In-Reply-To: <aJfmMuR0ERs394_c@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox