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 1w14rp-002XQH-0P for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Mar 2026 15:56:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w14rn-004vhJ-1x for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Mar 2026 15:56:00 +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 1w14rn-004vhB-12 for pgsql-hackers@lists.postgresql.org; Fri, 13 Mar 2026 15:55:59 +0000 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w14rl-00000002Uy7-19CB for pgsql-hackers@postgresql.org; Fri, 13 Mar 2026 15:55:59 +0000 Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id C48877A01EA; Fri, 13 Mar 2026 11:55:54 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Fri, 13 Mar 2026 11:55:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding: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=fm1; t=1773417354; x=1773503754; bh=GKn8sf8Xz4rfJHZjD8xsZ9nldiUWNOtfaNxSDgzJowA=; b= vMU99sTiQ7dUIeqcNqiXvtmHlgOjVb+Q9x4FGBN7w8GWigmtBjQxSe2AsyieaujJ MXgZgsVcg+Q0Y6teGKQjnZVkFD51lfOUDrssmFIC+LK3QDVBHYjn+hyUCXn6puDv 4jahe+aeyMS6yclhq1zyvLlec4e2vJm/aHS0TDEnKiVUUMRmKs3V9eFMKO6beZ+z Mjv3MQKIBcDOzrXrGRvRISMeT/BOUBKOhKfV4XBXJFX6z/UgkHOSPT/wlMopvP8i CS4qlPKktr6lh+NxnPHPMbivoEmnFDBbxWatIwNI6PKBKRluxFgSFA2Mk7ct4GMd pkG3joR9xhv7UNvyvSmbvA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm1; t=1773417354; x= 1773503754; bh=GKn8sf8Xz4rfJHZjD8xsZ9nldiUWNOtfaNxSDgzJowA=; b=1 C/TnCduD7fjsRfor2rDzRpUE3uZfM2oizi8YqYuz8atkyy1x/K+XsGRnJtnl6I2N Ww0QXXyyPRKbXdOqOYeNJ9UbtQKjoMeFRjOmB51S05yxxpDQIcfmmLG2XkaIURuX /we3oNp/Omrm1d3wl874YXcCQMKKv9TemW2kPolvPJchygwI4JK2UzGYxZNca1rG uJTQcbytNjN1hMV49tSIQxDICHklmhR6VvlHZUM+Jlvdi1u/8tPHAgFRsm8DlwIP 7h0hZZXAWCGNljFnHq0ZAdVTKPNb2ln9ZQInPX+vaSaNBlNQ0Mm5K0fvo0qw/MJb ic31j3LvpENDTkVI1+OVw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvledttdejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggugfgjsehtkefstddttddunecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpeehvdefffdujeevlefgheekueeuueevgfethfeivdffkeeufeehueeufeei teeugeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvgdpnhgspghrtghpthhtohepuddupdhmohgu vgepshhmthhpohhuthdprhgtphhtthhopegsohgvkhgvfihurhhmodhpohhsthhgrhgvsh esghhmrghilhdrtghomhdprhgtphhtthhopegvgigtlhhushhiohhnsehgmhgrihhlrdgt ohhmpdhrtghpthhtohepmhgvlhgrnhhivghplhgrghgvmhgrnhesghhmrghilhdrtghomh dprhgtphhtthhopehmihgthhgrvghlrdhprghquhhivghrsehgmhgrihhlrdgtohhmpdhr tghpthhtoheprhgvshhhkhgvkhhirhhilhhlsehgmhgrihhlrdgtohhmpdhrtghpthhtoh eprhhosggvrhhtmhhhrggrshesghhmrghilhdrtghomhdprhgtphhtthhopehthhhomhgr shdrmhhunhhrohesghhmrghilhdrtghomhdprhgtphhtthhopehhlhhinhhnrghkrgesih hkihdrfhhipdhrtghpthhtohepnhhorghhsehlvggruggsohgrthdrtghomh X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 13 Mar 2026 11:55:54 -0400 (EDT) Date: Fri, 13 Mar 2026 11:55:53 -0400 From: Andres Freund To: Alexander Lakhin , Alexander Kuzmenkov Cc: Noah Misch , Heikki Linnakangas , Melanie Plageman , Kirill Reshke , Matthias van de Meent , pgsql-hackers@postgresql.org, Thomas Munro , Robert Haas , Michael Paquier Subject: Re: Buffer locking is special (hints, checksums, AIO writes) Message-ID: References: <4csodkvvfbfloxxjlkgsnl2lgfv2mtzdl7phqzd4jxjadxm4o5@usw7feyb5bzf> <5ubipyssiju5twkb7zgqwdr7q2vhpkpmuelxfpanetlk6ofnop@hvxb4g2amb2d> <68e89de8-5f6c-4eaf-a800-e16a5e487667@iki.fi> <20260215195239.ce.noahmisch@microsoft.com> <52d064b8-63bd-45df-a405-b6017d49b300@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52d064b8-63bd-45df-a405-b6017d49b300@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-03-13 10:00:00 +0200, Alexander Lakhin wrote: > Hello Andres, > > 12.03.2026 00:40, Andres Freund wrote: > > I pushed this and many of the later patches in the series. Here are updated > > versions of the remaining changes. The last two previously were one commit > > with "WIP" in the title. The first one has, I think, not had a lot of review - > > but it's also not a complicated change. > > I've discovered that starting from 82467f627, the following query: > SET cpu_operator_cost = 1000; > CREATE TABLE t (i INT); > INSERT INTO T SELECT 1 FROM generate_series(1, 1000) a; > CREATE INDEX hi on t USING HASH (i); > DELETE FROM t WHERE i = 1; > DELETE FROM t WHERE i = 1; > > triggers > TRAP: failed Assert("BufferIsValid(buffer)"), File: "bufmgr.c", Line: 497, PID: 3942058 > > #4  0x000079a60ae288ff in __GI_abort () at ./stdlib/abort.c:79 > #5  0x00005a68d9343eef in ExceptionalCondition (conditionName=conditionName@entry=0x5a68d93ac27d "BufferIsValid(buffer)", >     fileName=fileName@entry=0x5a68d93c99ef "bufmgr.c", lineNumber=lineNumber@entry=497) at assert.c:65 > #6  0x00005a68d91a18eb in GetPrivateRefCountEntry (do_move=true, buffer=) at bufmgr.c:497 > #7  SharedBufferBeginSetHintBits (lockstate=, buf_hdr=0x79e5febbbc40, buffer=) >     at bufmgr.c:6830 > #8  BufferBeginSetHintBits (buffer=) at bufmgr.c:6931 > #9  0x00005a68d8e3c862 in _hash_kill_items (scan=) at hashutil.c:603 > #10 0x00005a68d8e3b7c3 in _hash_next (scan=0x5a68e735f938, dir=) at hashsearch.c:69 > #11 0x00005a68d8e616ce in index_getnext_tid (scan=scan@entry=0x5a68e735f938, direction=direction@entry=ForwardScanDirection) >     at indexam.c:647 > ... > #25 0x00005a68d91eb4ad in exec_simple_query (query_string=0x5a68e7270120 "DELETE FROM t WHERE i = 1;") at postgres.c:1277 > ... > > Could you please look at this? Yea, it's a stupid small mistake. Alexander Kuzmenkov reported it late afternoon yesterday, privately as I just noticed, and I was too tired to make sure an added test wouldn't have stability issues. Will fix in the next few hours. Greetings, Andres Freund