Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wjGHw-0001BX-1z for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Jul 2026 13:01:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wjGHv-00A8xZ-0f for pgsql-bugs@arkaria.postgresql.org; Mon, 13 Jul 2026 13:01:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wjGHu-00A8xR-36 for pgsql-bugs@lists.postgresql.org; Mon, 13 Jul 2026 13:01:35 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wjGHr-000000000F4-3Npu for pgsql-bugs@lists.postgresql.org; Mon, 13 Jul 2026 13:01:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 66DD1QTU3211435; Mon, 13 Jul 2026 09:01:26 -0400 From: Tom Lane To: Nazir Bilal Yavuz cc: r.zharkov@postgrespro.ru, pgsql-bugs@lists.postgresql.org, Thomas Munro Subject: Re: BUG #19551: TRAP: failed Assert("max_pinned_buffers > 0") In-reply-to: References: <19551-d4a55b8fe81db4f2@postgresql.org> Comments: In-reply-to Nazir Bilal Yavuz message dated "Mon, 13 Jul 2026 13:33:52 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3211433.1783947686.1@sss.pgh.pa.us> Date: Mon, 13 Jul 2026 09:01:26 -0400 Message-ID: <3211434.1783947686@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nazir Bilal Yavuz writes: > On Sat, 11 Jul 2026 at 15:08, PG Bug reporting form > 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