agora inbox for pgsql-bugs@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>
Cc: r.zharkov@postgrespro.ru, pgsql-bugs@lists.postgresql.org, Thomas Munro <thomas.munro@gmail.com>
Subject: Re: BUG #19551: TRAP: failed Assert("max_pinned_buffers > 0")
Date: Mon, 13 Jul 2026 09:01:26 -0400
Message-ID: <3211434.1783947686@sss.pgh.pa.us> (raw)
In-Reply-To: <CAN55FZ2P0KbZ4vUOegAj-nuFndF5cHj=WSR8q=mg8dth5AQN5w@mail.gmail.com>
References: <19551-d4a55b8fe81db4f2@postgresql.org>
	<CAN55FZ2P0KbZ4vUOegAj-nuFndF5cHj=WSR8q=mg8dth5AQN5w@mail.gmail.com>

Nazir Bilal Yavuz <byavuz81@gmail.com> writes:
> On Sat, 11 Jul 2026 at 15:08, PG Bug reporting form
> <noreply@postgresql.org> wrote:
>> This error occurred when attempting run the temp.sql regression test from
>> the master branch on the REL_17_STABLE (#bab0a2db).
>> It seems, REL_16_STABLE and REL_18_STABLE work fine.

> Thank you for the reproducer script.

> I think this is expected. If you disable asserts, you will see an
> actual error message: 'ERROR:  no empty local buffer available'. This
> error message can be seen on both REL_16_STABLE and REL_18_STABLE too.

The point is you're not supposed to be able to trigger an Assert from
SQL.  I don't see that Assert in 18 and up, and digging in the git
history shows that 92fc6856c replaced it with some logic including

    /*
     * The limit might be zero on a system configured with too few buffers for
     * the number of connections.  We need at least one to make progress.
     */
    max_pinned_buffers = Max(1, max_pinned_buffers);

The commit message claims

    In practice it was quite difficult to exceed limits and cause any real
    problems in v17, so no back-patch for now, but proposed changes will
    make it easier.

but evidently "quite difficult" isn't so difficult after all.
I think we must back-patch at least this bit of 92fc6856c.

Thomas, what's your thoughts on how much of that commit to back-patch?

			regards, tom lane





view thread (4+ messages)  latest in thread

Message-ID: <3211434.1783947686@sss.pgh.pa.us>
Permalink:  ../3211434.1783947686@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3211434.1783947686@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, byavuz81@gmail.com, thomas.munro@gmail.com
  Subject: Re: BUG #19551: TRAP: failed Assert("max_pinned_buffers > 0")
  In-Reply-To: <3211434.1783947686@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox