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 1vsy3W-00BaZk-0u for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Feb 2026 07:02:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vsy3V-002Q0b-0l for pgsql-hackers@arkaria.postgresql.org; Thu, 19 Feb 2026 07:02:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vsy3U-002Q0S-1F for pgsql-hackers@lists.postgresql.org; Thu, 19 Feb 2026 07:02:32 +0000 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vsy3R-0000000061g-1DTP for pgsql-hackers@postgresql.org; Thu, 19 Feb 2026 07:02:31 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 9E1487A00F7; Thu, 19 Feb 2026 02:02:29 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 19 Feb 2026 02:02:29 -0500 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=1771484549; x=1771570949; bh=PIUdrZ1+7j b3IYpgnlDZM8v6Agrs6o2LEFjrBVe9LD0=; b=tOEVbwjUr3KWVczdPFpy3AWzpl K/rxeWUD5Ygz27MKBWOYGayA8TYAotYeT5fBuKCRFEctTZh10EaTNolP0bGQ09ax cfJ0QBq3WXP/1fpx1gRyHCo9zPUjJDpJF1xGoc1Qe4fKfEV5vyMLFouxRDYYjgAv OXu+sBp0eBynjrx0Lmiq3OdOg5v+qdCP/yzh5RoRwoqL5V3lXC4JJedThySOAjXH 2Vg9KYBE4JrWZQ0kwnH7JS9xds5GXP1nUSgONVuPX1txUQ3v2WYOrvCM+7dHwJc/ zlR32Nih2fa1tQ4DdZqAQ9i54D2FoYGvehznoT1j3NeeL60PFk5xAB9Z0KCg== 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= 1771484549; x=1771570949; bh=PIUdrZ1+7jb3IYpgnlDZM8v6Agrs6o2LEFj rBVe9LD0=; b=tNxMx8PZozu9a0IrgA/4REzpj6DpG8czkK+7Zg14+Rm9MfieKbk iUfPKnxkirRSbjojrrC/AwAezEt+ihpc5qKl8twTKlnim/OI/wdACoeEb75iaomz R+cC1J3z84xb+vUsDJAUvVXq0m4s7MgMUUeFrOCaq45R+cHZK7Zhe4uQJHhHx1q6 MvERVRppFEx4NBnlNwYSqv21cQzKB5sH0aIxlpukqnFJizmJw8MVILA5AFMOVdtt S23k+Y/mnatUHhwcnlWGesNhwn7j388na1OpZK+APJEcQZtANeOJOgw/nS2n8ZY4 725KgQVHTv2QAoj/rLNg+30XF+JpANE00xg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvvdegkeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeggeeg fffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidp nhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhgvsh hhkhgvkhhirhhilhhlsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgr tghkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Feb 2026 02:02:28 -0500 (EST) Date: Thu, 19 Feb 2026 16:02:23 +0900 From: Michael Paquier To: Kirill Reshke Cc: pgsql-hackers Subject: Re: Release and unpin buffers after leaving CRIT section in GIN. Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="h4rQe/+BbXdJ0wl3" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --h4rQe/+BbXdJ0wl3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 17, 2026 at 03:14:45PM +0500, Kirill Reshke wrote: > Looks like there are two more instances of this on HEAD: in gistbuild > and log_newpage_range. Is it? Planting an assertion in UnlockReleaseBuffer(), there are two extra places that can be spotted: - Most of the places reported by the regression tests seem to come =66rom gistplacetopage(), with UnlockReleaseBuffer() called for a rootsplit. This case is actually OK to me, where the new buffers are all unlocked with the root page locked. I have to admit that I am not the best specialist ever on this one, so I may be missing something. - ginHeapTupleFastInsert(), with UnlockReleaseBuffer() called before GinGetPendingListCleanupSize(). This one is not in line, being registered as buffer in a XLOG_GIN_UPDATE_META_PAGE record. We could do better here. Saying that, the cases of createPostingTree()@gindatapage.c, the three in ginfast.c, the one in ginutil.c, the two in ginvacuum.c (one with only unpins), and xloginsert.c are no-brainers to me, so I have applied these. The two proposed cases in gininsert.c and gistbuild.c do nothing related to WAL-logging, though. -- Michael --h4rQe/+BbXdJ0wl3 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmmWtX8ACgkQnvQgOdby QH1g7Q//QdE2BFhvDw8F2+aZJBGODjqnBu922hB8XZx7vx/PFB3IZEhVge+1BUCz kom6uoL/nWBOujTPHMW1y1rXz5vwY1oS7AomxoBjnX5po2jopf3qE2DgrwWnSrNa AXK3tbteHfl3F9rfz+BlNrKo5svn2XwLE0jqG7mdAEyEp1WHlOx92Ke5aXlQUXf7 RHuDVZExblVfBLGCi7a2bOEic+RwC4P5X7vScH6fe5PoDeHdOTNtyQnCAyMrhQP9 /ZP0wN8+beP58lXPWwa2lDOsGDprs16ICUiAU/mZ6yLtpmHv1H6K/gofUNllIFtC MUJIqYwxqs5yjBXOJ0T/6fAdAd2qvEkKH/+dJD5H+H1VkRC0f5R4NwHm9Tg5gJKJ l0U8N6yTtdv1HRZbMqPylOgj/SfKlaBb6Mqhr/HqO1FwWYLUBwE4Y2oG9WbH6GD7 8DLUDZHAKrOFHvOQppHeXUsPX6XkyXzSH7GlKHyG+0dnegsuAaJyCe+omsJWIPsR rZVJt/LzJxsPUs0BR/8U4WXaujA06Kv905ATxryoBffFWfAYX00g40f9/YrxmS7t EHoSwSzs5F7/uslPITCmxGqkExHyXJPWFGmJZSku683C/tICWP4mNQTAofbpsf7n c0w0K5+ajCqo81JW/8SHM/JrdSVRmi7rikbsKBUuFs4fDFfZYbI= =rybA -----END PGP SIGNATURE----- --h4rQe/+BbXdJ0wl3--