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.94.2) (envelope-from ) id 1uktpR-008SGM-KV for pgsql-bugs@arkaria.postgresql.org; Sun, 10 Aug 2025 00:22:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uktpP-005WXE-2w for pgsql-bugs@arkaria.postgresql.org; Sun, 10 Aug 2025 00:22:23 +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.94.2) (envelope-from ) id 1uktpO-005WX6-B0 for pgsql-bugs@lists.postgresql.org; Sun, 10 Aug 2025 00:22:22 +0000 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uktpL-001hYq-0I for pgsql-bugs@lists.postgresql.org; Sun, 10 Aug 2025 00:22:21 +0000 Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id AE0967A003B; Sat, 9 Aug 2025 20:22:16 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Sat, 09 Aug 2025 20:22:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1754785336; x=1754871736; bh=lwPRtBHFg5 abe45ddFCCUBu1o7r6VznhcCICzbgsgVg=; b=csVRwDXv7OkUEEnR/xjhWftNF4 +DOsRAtAU3c9rokPk/gX4BQW2/SXZ0SgJSRq2Qz0TUicayCN/q4CcJ6Qt/7cSfiC fSrFYcxy8DfW5m4E0yFBw6VYuP+uScIh+EQyZkFMszUF2y/fesgjeOngko46pWWk VxxwyLXqeVtqO8ydROPLG0utoIsIAmTFkVF9eCyJ1gIJKS/oYTQmOTZATGC7RhDv k6xNGUcB9b1yWB6/+3y8mKGVykwJANKcsyj4hh6erIYQQ8cMaiOG/jx2QNVVrJBu Z1Vt4BDl8BU2L3McLx0SgZuMa4Wwcx2HvGqr9TUbn0OlI31WYH4Z+aMddNdg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1754785336; x=1754871736; bh=lwPRtBHFg5abe45ddFCCUBu1o7r6VznhcCI CzbgsgVg=; b=jGaCLEDKGSJ1y9YR4m1YqMEpmLAqBzH2DTCn7QQVDCN15lojSUe T0ABJv6GgcIwIRTHvotVFkiAsowiDTY47QiE0O4grSFSosaABkemhO4GYjcm/ska 9nZCxxIMaGsu3UdzPvzqNmZVsdnOn7VDesuzK0ogvG5QimTwQN5MEy5L7muLxY7D Jq8OmGN4WzTrjylpO/pjqwQLE/E7I8SC2qA4uYfGUChXDx7Itgy7qcGZDoseV8gG yCMuPJNHUieY0J1srYG1if/tUa2/Qvf72E2JsMlyuDONj2NbPMHVxbKEWCLcY6Vg 9TUCnmTT1qz7kJo/Qu20QYZUXQ8ff7sWqUw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduvdekuddvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohephedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepthhhoh hmrghsrdhmuhhnrhhosehgmhgrihhlrdgtohhmpdhrtghpthhtohepgihunhgvnhhgiihh ohhusehgmhgrihhlrdgtohhmpdhrtghpthhtohepvgigtghluhhsihhonhesghhmrghilh drtghomhdprhgtphhtthhopehpghhsqhhlqdgsuhhgsheslhhishhtshdrphhoshhtghhr vghsqhhlrdhorhhgpdhrtghpthhtohepthhglhesshhsshdrphhghhdrphgrrdhush X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 9 Aug 2025 20:22:14 -0400 (EDT) Date: Sun, 10 Aug 2025 09:22:10 +0900 From: Michael Paquier To: Thomas Munro Cc: Xuneng Zhou , exclusion@gmail.com, pgsql-bugs@lists.postgresql.org, Tom Lane Subject: Re: BUG #19006: Assert(BufferIsPinned) in BufferGetBlockNumber() is triggered for forwarded buffer Message-ID: References: <19006-80fcaaf69000377e@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="y4apcFH4bGuM2P3W" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --y4apcFH4bGuM2P3W Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --y4apcFH4bGuM2P3W Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmiX5jIACgkQnvQgOdby QH1ESQ//U3JUrpcgp5RNHGJdv1DrnFko0YgPPbK/firYROwlX5BWLfjWqDxtQww3 UUtxKHBBT9u+uKfigkhtD1kbHN62xiDXKJkZVQxnJlMyMx2FA4qtEzb1gGM8f2Zi nGhdA8N+5Lm13GlouUYWQK6a8NGeLd5MbAgjT/x+LYyrhGMKzNrYxvYIu8tS0yVe aqAsSp2FoEhVn+0RCyQuGsqkEaTDONqVtIYbSQ2IoojRU2ylEaz15wDoS0388eWV wnnbTYue5H6IWpIuTyLlPK+vj7Oi9N6C7UDMWpvfH7ByVMo4Qy2V1ilRkXArgrDZ To3za9w7UpnAXZtXl8rwfWUj13DkmUrjE9azbIhkD/p8wbBMLfzi4Un5AYfrN2c4 5uwrTMr5QFIUYZDFomKKLe874T+i+yIDK/NkOZdEHbCUKEs+/oksSIWO3aKXLfH2 yA2iaMcVL6EX3tTCbKRjEHEyGvb0pZJWj4OyuB8lxT1u6jIB0jm/IKj6ncfZpE5k RKhpluXPTsndoe7Vo6hAuO6tWZSlpmkrTunxgbd0qAaleca8dJMWldChX9myVmOT uo20TcVm1JMDBpeqaztRRZjbyNPj+f3NR7LW5Dby9+iaPIgPWhKRqm6IA+12xigh dVxhX1nUa5DQlw+3Pegsf9fXyw7QHJ9hqdZXmSUBgwagWr8PCUQ= =FRuq -----END PGP SIGNATURE----- --y4apcFH4bGuM2P3W--