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 1vQbQH-00CR68-2A for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Dec 2025 01:12:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vQbQE-00AnVK-2y for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Dec 2025 01:12:47 +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 1vQbQE-00AnVC-1c for pgsql-hackers@lists.postgresql.org; Wed, 03 Dec 2025 01:12:46 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vQbQB-002qGN-0H for pgsql-hackers@postgresql.org; Wed, 03 Dec 2025 01:12:45 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-42b38de7940so3033191f8f.3 for ; Tue, 02 Dec 2025 17:12:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bowt-ie.20230601.gappssmtp.com; s=20230601; t=1764724361; x=1765329161; 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=KsacG/sEKZIhdEV9+oqHv9W+gEeccxnh/4Hkb4JbfyQ=; b=Om5PJUniyR/824IN1uT3MxbmVnLWnHoowOfxizQJYTJ5POF7RkDx6j2U9weMeyZdCh sklJIFdDbEsvbADJSgXM9wODHjcQK6pnqGF6wARSTYBEnGWDBuai13abI0UtPNzezUFv wqlt3vbFLEtR+lktng75li1DbM0MCpjSlFEPPfTpFq1qJH7IsqjW9XlXg/RAz/jbEaDk cjJGNRJx4bmhb7ail/tzoxGoL2trCNKwTMFkA3fUEO2h6IjUxa46gEXLqUJo0AzXX4ll k4JnvyYIW9Q/8EvXl8acUhOggg9qNda7tivG5b+bzVmfdPvtpHwADh/Q38V1VGNmjRDV 9T+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764724361; x=1765329161; 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=KsacG/sEKZIhdEV9+oqHv9W+gEeccxnh/4Hkb4JbfyQ=; b=svrk84Rt2m0auQU9oaxggUnSAeK8zW4vYUwRyabMX5JDFC9wUPLO8l51uJAV81Vsgy IjwEVE1RocILuHdMQgFaaIN7NEVQiyPnxlo4VYc0XT7lhFMReg3QaetHpc4iLGaO6Mci OFNinE/NbLIiwkWD0YdSSKXT3zGxJ+GBOi8AN2l763M8RamECcewdIljQvFjlTc8004B 8iid6Z4WRANdZJKDxt9w2dHQ6wQU++sklkFAH4jrDfPKnxuvwzZq7fKVQqeTy2gjJFNx 9tkJDboficUnoyvj872w1AEcOTkd2/Vyxqo+N8FGhg34ClXB8SY6wVmAbemVCAKZfZvv MVbw== X-Forwarded-Encrypted: i=1; AJvYcCUcoGkwtLiKVYsGxJuFd7RhI8iYDKZ8CvQrypIKnecEu3IF01A3HzWhUwO0f0R0+IaNRMLgBiy4XI1pICVa@postgresql.org X-Gm-Message-State: AOJu0Yzcm6wBFm+ulsb6SfbSJPTljo3GhV61REl4LdfQUgzjpKEAKTbF L4zz2no5E9ap4Klr/9hmv34YizmRCMp2gXcIwYrau9D6E1jtWFxeStm3dae/N4VyhUBfJthOSUP gdzAcunrht7XIBUl3j7dhvTWDh2xkurk/IdEDoWn18g== X-Gm-Gg: ASbGncs4tHiqO/aFxTM8b7qMTBIc47djq0cfqnWXLXpJ5+TozQRHx4dsUaQ9UTy6ieD ndD/1XUVKYdpT+Uc4B2Xv+kJgE1t4YnynA6u/Hdy3Y8qh0YqnG/yaFEczlhhzEt4zp4lw/qFMr4 XImPv4tWh6UHpQLp440C0fQb3LNA5MMB6tu1C8/p0FxYdNkXIm7P5yxnDLCcETsJrYXlC0Al0NW oTuI0Rgm0cNdMT+CHnKDsp0fdNuErjDJxTLVAmf2b/bI+jTgzGq/k+YGuESOerDwMqssiE= X-Google-Smtp-Source: AGHT+IECeWhb0FwZFZMa6G0F+e36kBNNi8b1l1HrBpkhFqE/pJOSOtzN9PDJGkNVM4i6JpFkW9KcYz2/rGlCbU/Z3mA= X-Received: by 2002:a05:6000:420d:b0:42b:3c3e:5d2e with SMTP id ffacd0b85a97d-42f73190607mr267774f8f.1.1764724360667; Tue, 02 Dec 2025 17:12:40 -0800 (PST) MIME-Version: 1.0 References: <6kmid26do57ykqfpvq6iieniy4djsymhrypkjccazq5g4bbe6a@2y6owwv7qpex> <3je3ahgf7rrmmurxo6hnlhg5d3ffwfrtjwjxd6jm5srlv5iebp@vxqk5qtgmowr> <3w7v3w6a57jnssokap4k7thoekig72flnyhd4wp3yftzdd7lm7@f6lpcfen6hr7> <6rgb2nvhyvnszz4ul3wfzlf5rheb2kkwrglthnna7qhe24onwr@vw27225tkyar> <3nce7i72ayzkunai6mkz24ckbxk74jodz4ua2chcdrwppxlxcd@w6x5kfkjrkru> In-Reply-To: From: Peter Geoghegan Date: Tue, 2 Dec 2025 20:12:14 -0500 X-Gm-Features: AWmQ_blW9ON7_enke9Ul5pvadgkHFAsQQMVKU6u2z10IoHAS3QiPcb4M4X7XvDQ Message-ID: Subject: Re: Buffer locking is special (hints, checksums, AIO writes) To: Andres Freund Cc: Melanie Plageman , Matthias van de Meent , pgsql-hackers@postgresql.org, Thomas Munro , Heikki Linnakangas , 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, Dec 2, 2025 at 7:47=E2=80=AFPM Andres Freund w= rote: > On 2025-11-25 11:54:00 -0500, Andres Freund wrote: > > Thanks a lot for that detailed review! A few questions and comments, b= efore I > > try to address the comments in the next version. > > Here's that new new version, with the following changes _bt_check_unique will hold an exclusive buffer lock on the page being LP_DEAD-set in the vast majority of cases. Should we expect your changes to have no effect at all in that common case? The BTP_HAS_GARBAGE flag is deprecated these days; we basically don't use it anymore. How much value might there be in avoiding setting BTP_HAS_GARBAGE as a way of being able to use BufferSetHintBits16 more often in nbtree? --=20 Peter Geoghegan