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 1v6xMf-00CVI7-6c for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Oct 2025 20:35:53 +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 1v6xMc-008WUZ-V6 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Oct 2025 20:35:51 +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.94.2) (envelope-from ) id 1v6xMb-008WUO-No for pgsql-hackers@lists.postgresql.org; Thu, 09 Oct 2025 20:35:51 +0000 Received: from fhigh-a5-smtp.messagingengine.com ([103.168.172.156]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1v6xMY-000vEv-0Y for pgsql-hackers@postgresql.org; Thu, 09 Oct 2025 20:35:49 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id F26C214000E4; Thu, 9 Oct 2025 16:35:45 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Thu, 09 Oct 2025 16:35:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; 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=fm2; t=1760042145; x=1760128545; bh=KleViLrICZ Mt3FNF6VNMHSpHvUSot+jueSOubX9XlAM=; b=f9sY2pyKd62eKGthuUkCBwQP4/ pfkHlF0pX66cZBZDWXDDCYjnuXW9YRP+Zhz+jlIHRLjkDNQqW4eXN6bL+ceRYcP+ qUVsQbmwZwKwVP6BT5ZuKtDn2c0iDSqu8Uua1l3G6Q0HfvU+kvBHndZGaWz/TIIC nEGZMUcK5xOpFeXE/yHn2cKZI+AIsUh1hRKar43Z3idsabocK63CocaPtJqBGq2D JnMXkw/6fczWKP2FrbVJZr/dxk676LVYi8DxUDGBEVjXl5ToBHMDHrJT7+CU0dgq bCfodpwBT2cyg6cElOFdCdgKg5vYKaC3kdWlo153/08BSzdwGGO+TwClAYXg== 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=fm2; t= 1760042145; x=1760128545; bh=KleViLrICZMt3FNF6VNMHSpHvUSot+jueSO ubX9XlAM=; b=kvjNg6C2EhNtncS/2+OVSkxXgGEuo5pwPxQtau9nNXh1ulMSCFa R9uurHXlgwR1K9bcoxz3XFQNDUWuDm2bcMp8CJepkveb/kVvtgTrfpt36o5hrl8R Oll4JQhYSI1LdiI668tz9sYRXIvNHFY4crK0d467DBePhkPDNrGEKD12j9D2J36U m0AHMw48EuGoXxHevfhJkSqBjK6sw7v5aRyEHbncT7NYBZ87xKkzWUXBhcTy9iyZ EzXXjHcPf8F5Jl1kZdLt5F8WQnLfPlqlzEKeyHHYDa4y+FTBPo4tdyomHjcV7Sig A4S04x12Pk06N88wP2mjTgvxYiW6OderQbg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddutdejudehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesmhdtsfertddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepfeefudejgffghfegheduffduieejgedtkeejhfevieevgeekgeekleeljeef keeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggvpdhnsggprhgtphhtthhopeekpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopegsohgvkhgvfihurhhmodhpohhsthhgrhgvshesgh hmrghilhdrtghomhdprhgtphhtthhopehmvghlrghnihgvphhlrghgvghmrghnsehgmhgr ihhlrdgtohhmpdhrtghpthhtohepmhhitghhrggvlhdrphgrqhhuihgvrhesghhmrghilh drtghomhdprhgtphhtthhopehrohgsvghrthhmhhgrrghssehgmhgrihhlrdgtohhmpdhr tghpthhtohepthhhohhmrghsrdhmuhhnrhhosehgmhgrihhlrdgtohhmpdhrtghpthhtoh ephhhlihhnnhgrkhgrsehikhhirdhfihdprhgtphhtthhopehnohgrhheslhgvrggusgho rghtrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvg hsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 9 Oct 2025 16:35:45 -0400 (EDT) Date: Thu, 9 Oct 2025 16:35:44 -0400 From: Andres Freund To: Matthias van de Meent Cc: pgsql-hackers@postgresql.org, Melanie Plageman , Thomas Munro , Heikki Linnakangas , Noah Misch , Robert Haas , Michael Paquier Subject: Re: Buffer locking is special (hints, checksums, AIO writes) Message-ID: <3je3ahgf7rrmmurxo6hnlhg5d3ffwfrtjwjxd6jm5srlv5iebp@vxqk5qtgmowr> References: <6kmid26do57ykqfpvq6iieniy4djsymhrypkjccazq5g4bbe6a@2y6owwv7qpex> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="552mi4kotjb5rbyk" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --552mi4kotjb5rbyk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I pushed a few commits from this patchset after Matthias' review (thanks!). Unfortunately in 5e899859287 I missed that the valgrind annotations would not be done anymore for the buffers returned by StrategyGetBuffer(). Which turned skink red. The attached 0001 patch centralizes the valgrind initialization in TrackNewBufferPin(), which 5e899859287 had added. The nice side effect of that is that there are fewer VALGRIND_MAKE_MEM_DEFINED() calls than before. The naming isn't the perfect match, but it seems fine to me. 0002 is a new version of "Allow some buffer state modifications while holding header lock", mainly with a fair bit of comment polishing around BufferDesc and one small oversight fixed (didn't update a buffer_state variable in one place). Greetings, Andres Freund --552mi4kotjb5rbyk Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v5-0001-bufmgr-Fix-valgrind-checking-for-buffers-pinned-i.patch"