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 1vg1gq-007Gib-0n for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jan 2026 14:17:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vg1gp-00AboC-1S for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jan 2026 14:17:39 +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 1vg1gp-00Abo3-0T for pgsql-hackers@lists.postgresql.org; Wed, 14 Jan 2026 14:17:39 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vg1gn-000RI8-1C for pgsql-hackers@postgresql.org; Wed, 14 Jan 2026 14:17:39 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-6505d3adc3aso13504851a12.1 for ; Wed, 14 Jan 2026 06:17:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768400255; x=1769005055; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GHj/18BIAimUfqSwELn68edoc9tYml1076kY1+y5XRo=; b=GvS5Ecs3xpjKbpOpKqgHMGF6bc4vcG8MhTxP3eWDY0I+ddpQbmW9lAbxdfC3mgiRZX 5QUb+qK7pdjBBU8NfBSbKit0vGCv57sNznW/5QAodKqRLPZHI070ri2eAdeEk7M1zmFB fsCaUSdrhnIDTkj1mo991H75eEM/q5OIGyihFhbsoWlzA9PufpYFreCfj6Jdz0Pzukph PfjGEWpdp1QNxcYcr1leYrg0Ee+DfTT3V2hSkxiuiDQE7S/sVylQ1j7U9OL8qWFYYTNj QIp9UWR8rxClRaagnkkMvfy7xsHG2fB3cYPjZSgsy7LfpUrwLPL1jcZd8dVpqqy1G/lT i4/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768400255; x=1769005055; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=GHj/18BIAimUfqSwELn68edoc9tYml1076kY1+y5XRo=; b=NxF6Uy2OX4Vg8WoBqUwAGXa1BnkY3UcX/Qc5rKptgtMXEcpfaT1yScfyviAOnGq51F H1VBEWQxjksHB1ly6wC41Zzsg7sqe4DY7Twns9sJpQOmX7bpdinIlq5aw/1xqA6u2NLl KgKt59hZ6k+z8FxCpowI8hu76OC3YzNlV5qouiZ6ZtBomvmJXs6fRhdHTf91O30ZV5cM I6PU5GYFcEfsCMn55oftOjnLu+M3zXK0DKlvHRKZk6EPMYQ9hDkUXuvto1bsN//iw8kz J7evONtnIpiYNbTIgnChkQwonJW8/stoNXPMa4gn5lmF7/1sHv6iOVuAUk2XzxtGvsH1 x9aA== X-Forwarded-Encrypted: i=1; AJvYcCUuWcZBDWUyI+te/Lk3MtEQFg0DMaxYs2SZqH3DDyiL4PJisH+QyakLvsGA9Fn2PTR4AJG2szIlj+7HWQAT@postgresql.org X-Gm-Message-State: AOJu0Yx3VdfjX1P2bfUmMzqFhAnqwmuJ57R2fnyTePDJVaMEU/Hi483l r9rTpXD3542W2Q0+JG/jMWS2kCJpaFHrOX/pOWQzs0xxUWxkxZSvxujUnm6KtuZFbgcoezVIOJR tsXcWav9ihDNzkZ+h0pax0odYocpUw/w= X-Gm-Gg: AY/fxX78dekOzRrWz6evswaXvPpUtby5ZHZ+vBUZ0atjiDhMzy5ZwmN6dUc5+nOGKoT 6mrsiAtXiplMiss1Lpgjn4INTop4XGDolfgKS/GQhQf8y1FEzMg+4Bft3T+LpipyPnKOXmDwUAf GkWmMCEDKNR8YTGO2GaPZvx5xvTHdCSwfi5JhX0A/8hTwCctkvAeayoxAzgbLS54Ox5I8eBLMvF UK6NiznanJbD2FizKIvq5I2pm8zC2ubQngJJq9nKQ/mTcrsAEYoQgscAUqeBnyVayi8xeCKFXir A0+FrvnuJXI+OmUvmjpdKxHhX+4V X-Received: by 2002:a05:6402:311b:b0:64d:46ad:da66 with SMTP id 4fb4d7f45d1cf-653ec462a33mr1582218a12.25.1768400254493; Wed, 14 Jan 2026 06:17:34 -0800 (PST) MIME-Version: 1.0 References: <1108f18d-cf7c-4f17-b29c-a119fe42f7e5@iki.fi> <5dwlfu2jyzkyf3nrlzxxblxctb6xio5es73ptgsahjnmfu5miu@772rc764hfhi> <4csodkvvfbfloxxjlkgsnl2lgfv2mtzdl7phqzd4jxjadxm4o5@usw7feyb5bzf> In-Reply-To: From: Melanie Plageman Date: Wed, 14 Jan 2026 09:17:22 -0500 X-Gm-Features: AZwV_Qi8oPQGCJHXmNWSLHkXLyaR5DFbvFoT7dU97uz0X7OFMdkiRBh6lqbJInE Message-ID: Subject: Re: Buffer locking is special (hints, checksums, AIO writes) To: Andres Freund Cc: Kirill Reshke , Heikki Linnakangas , Matthias van de Meent , pgsql-hackers@postgresql.org, Thomas Munro , Noah Misch , Robert Haas , Michael Paquier Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jan 13, 2026 at 7:49=E2=80=AFPM Andres Freund = wrote: > > On 2026-01-13 10:05:02 -0500, Melanie Plageman wrote: > > > Ironic that ResOwnerReleaseBufferIO() releases pins and not locks. > > Not sure I follow? I don't think it releases pins? And why should it rele= ase > locks? Ah, I must not have actually read it or read the wrong thing. > I also wonder if we could merge BufferIO into the private refcount > infrastructure, similar to how the patches store the lockmode in the priv= ate > refcount. The separate resowner acquisition does show up in profiles whe= n > reading from the kernel page cache, so that'd be a nice (but small) > improvement. When you say "BufferIO", do you mean io_wref in the BufferDesc? - Melanie