pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Xuneng Zhou <xunengzhou@gmail.com>
Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org, Michael Paquier <michael@paquier.xyz>
Subject: Re: BUG #19006: Assert(BufferIsPinned) in BufferGetBlockNumber() is triggered for forwarded buffer
Date: Tue, 05 Aug 2025 00:43:06 -0400
Message-ID: <992760.1754368986@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+hUKGJyqwQs_kQFB1J=bx4pHMrMcPF8_PgNKyeNFEo+yNvyiQ@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>
Thomas Munro <thomas.munro@gmail.com> writes:
> Here's my proposed fix. Great reproducer, Alexander, thanks!
I've not looked at the issue actually being fixed, but a drive-by
comment: these loops
+ for (int i = 0; i < stream->forwarded_buffers; ++i)
+ Assert(BufferGetBlockNumber(stream->buffers[stream->next_buffer_index + i]) ==
+ stream->pending_read_blocknum + i);
should be wrapped in "#ifdef USE_ASSERT_CHECKING". Maybe the
compiler is smart enough to throw away the useless looping logic
in a production build, or maybe it isn't.
regards, tom lane
view thread (29+ messages) latest in thread
Message-ID: <992760.1754368986@sss.pgh.pa.us> Permalink: ../992760.1754368986@sss.pgh.pa.us/ Also on: postgresql.org/message-id/992760.1754368986@sss.pgh.pa.us ·
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: tgl@sss.pgh.pa.us, thomas.munro@gmail.com, xunengzhou@gmail.com, michael@paquier.xyz Subject: Re: BUG #19006: Assert(BufferIsPinned) in BufferGetBlockNumber() is triggered for forwarded buffer In-Reply-To: <992760.1754368986@sss.pgh.pa.us> * 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