agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make max_pinned_buffers be > 0, don't just Assert that it is.
Date: Wed, 15 Jul 2026 17:24:09 +0000
Message-ID: <E1wk3L6-000KFf-0r@gemulon.postgresql.org> (raw)
Make max_pinned_buffers be > 0, don't just Assert that it is.
It was possible to trigger read_stream_begin_relation's
assertion that it calculated nonzero max_pinned_buffers,
in scenarios with unreasonably small numbers of buffers.
There seems to be no visible problem in non-Assert builds.
The bug occurs only in v17 (the first branch containing
this logic), because commit 92fc6856c replaced that Assert
with a runtime clamp. I won't risk back-patching that entire
commit, but let's copy just this minimal fix.
Bug: #19551
Reported-by: Roman Zharkov <r.zharkov@postgrespro.ru>
Author: Thomas Munro <thomas.munro@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19551-d4a55b8fe81db4f2@postgresql.org
Backpatch-through: 17 only
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/3d3b8872814362e061802703bb5d92fe050fc602
Modified Files
--------------
src/backend/storage/aio/read_stream.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
Message-ID: <E1wk3L6-000KFf-0r@gemulon.postgresql.org>
Permalink: ../E1wk3L6-000KFf-0r@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wk3L6-000KFf-0r@gemulon.postgresql.org
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-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Make max_pinned_buffers be > 0, don't just Assert that it is.
In-Reply-To: <E1wk3L6-000KFf-0r@gemulon.postgresql.org>
* 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