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.98.2) (envelope-from ) id 1xC3dA-00000003X4S-0W4p for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Sep 2026 23:22:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xC3d9-00000004MYZ-0VmM for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Sep 2026 23:22:31 +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.98.2) (envelope-from ) id 1xC3d8-00000004MYR-3UBb for pgsql-hackers@lists.postgresql.org; Wed, 30 Sep 2026 23:22:30 +0000 Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xC3d6-000000026pa-31Sf for pgsql-hackers@lists.postgresql.org; Wed, 30 Sep 2026 23:22:29 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 4028F7A00CB; Wed, 30 Sep 2026 19:22:27 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Wed, 30 Sep 2026 19:22:27 -0400 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=fm1; t=1790810547; x=1790896947; bh=ImfTqhCIjR 9WjWcfIndOz7kSGEeAXuAmB3KHRcVAMlA=; b=aeST15em/wuM18uRwo43l8a7Ex sbi3hcEmBexClyOoYPVqdPB9K250VKZZ6pX+32dFZYoTgaIFynx1uDe+tpG/VpMB BHEOEyY/L3z9692VEvWDLtO6Eii/KONmkWSfnsFzOK8YexTpa2JAp8EVdr6yooRj 65JyN8VSGaG+4o6dKVy5IRjnVz1QJqDdoHQCImRcXQuOnrymTDCMw13CXJ88Wvrm Zw8JtneA1gDdCjReqfLqr49IzDJL6HkjuRM8GUmcr8Whqx2hJ4nGEhDGiJyhVEzN WvwO31HHq3OCAtQ/Tu0WvRPgeeXkRAUk+xhp1dGuarKIfsRCzHlLOkxxeV0A== 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=fm1; t= 1790810547; x=1790896947; bh=ImfTqhCIjR9WjWcfIndOz7kSGEeAXuAmB3K HRcVAMlA=; b=f04/3qIP2V7J4F4YGMYUDT16EZKTb3/XiUh0Pw4wXJ6zceJ59e6 7zbWJmH2WW+F5kAhYF6FvmLlWKSslomCGWoOaX8YvkRXRXt/HPEjLoNTchSox2F+ Fj7kKxLIY96MX9rlYERmcf/wveDtxpKRJXx0yEhhoEqH8i4DLcb4ccl+MnPeKi4N XXEFDz8CQ1iQQcrZzCJx+cm5LEwyulkJ2vsI/v5rLlRh3FmK2fjXoF7Ucl73d7A0 /v37BRMuHVEymjJj6JnbsEn+0NstwRiz1kkKY7ef2+ZZ3kN0JiZu6QEZmZ/IULbQ h0JreH3yV8BV6JQ9rtQdTJnOudUmCOgjWtQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGhMKvH+ecukbsJ+vv2j6WSViTFWitEb9He2mgL2DN0O5NeEa5a110z4glCPtby68 YzbH+M4uUWQHxfacPTV0SIhQLSPOLkng43Up+s2yJaVpW0DOKBIwHckXiT27Rlr5rrPbNi pUeg3vybDhdb46zGBwaqjxacRMe8NOUWlqWL0HrYRN58O2czHChHjQM1oMsI79yB2J9JEH eHQLX6AUqQ0yJS5H3n55nb51Ehe9Z/3CXmwCBZGa3aSK0RkMUiiIVb9mCv1fDu0Vtp1OLV Vac0//kwiU8nry9k+kqmh+2Ebiy9tKmPKoT868gGyUQo0PF0q0fKXZoM4Bo2ZBbo0/Asn/ 3r1bPGrDHuHwGihIFYHE4B9GYE1ASh1VG1fWPpIdbixNX1azRNZoXhGnJp1EhY7LnnUplR BTs8vZFbhWI27Tptg+sIxsvaMBliikVRD2qsexWYMwX4GGWFb0qvWLfI30DxG2euc4f0Cb cL8s8oO4SSskGGgSnonaaU0RaETGEnFEeKWBXzXY8n7l4DK3WY/lHg6x6Z3ViICGgc92kD I3epCEzbvRuI9Vz1BZ/Jr55sYMdN92SFdCxDvQKtjKASsGSmS0JPe9bHyKMfh2Nnqg7qhR UkdNvJjUoiDoU8XYPMaJTS8dEvtt735qRB7mLb/MohNbxeiLXSd2qjRjqPYg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 30 Sep 2026 19:22:25 -0400 (EDT) Date: Thu, 1 Oct 2026 08:22:22 +0900 From: Michael Paquier To: Hannu Krosing Cc: Bharath Rupireddy , John Naylor , Greg Burd , Yugo Nagata , PostgreSQL Hackers Subject: Re: Support for 8-byte TOAST values, round two Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Xc55UVNU6ng6SKkv" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Xc55UVNU6ng6SKkv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 30, 2026 at 12:44:28PM +0200, Hannu Krosing wrote: > In my insert tests 8-byte TOAST was much faster that 4-byte toast >=20 > This resulted in a solid 23% speed-up because it didn't need to verify > new OIDs against the unique index, despite each toast index entry > taking up slightly more space (30.1 bytes vs. 21.4 bytes on average) The speedup is not surprising. Thanks for posting some numbers. A note about that. Postgres hackers had a meetup two weeks ago in Tokyo where I have reported the activity of this thread, including the fact that the new values are not rechecked in the INSERT path. My opinion, same as upthread, is that a recheck is kind of pointless because we should never go backwards under normal running conditions and we would run out of LSNs before we reach the OID8 limit. I did mention the argument of using pg_resetwal -o to go backwards, leading to INSERT failures due to duplicates of the TOAST unique index. Fujii-san had a more biased opinion than mine, mentioning that a recheck could be a more defensive position, even if it costs in normal running conditions. Perhaps my opinion will be overruled in this release cycle, which is fine, I just want to point out that the API toastid_valueid_exists() is transparently able to work with a recheck of Oid8 values, so the value recheck could be plugged in for this case as well, depending on how the discussion flows. Perhaps there is a bug I am not aware of yet, that could justify the recheck, of course. -- Michael --Xc55UVNU6ng6SKkv Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmq9ma4ACgkQnvQgOdby QH2WVw//Zn6sViLEu+/eC8ek7RGGKDlmuoAuuwSgfL+GeFE49UMO9srhumIb5cMx gNbQYkuHxLcFrwgz/pZ7CidpkkZ14S/tx2UnsEAAUG07nE9yOWykPSBGSDa4GVuW 1T/Cq/4rvm9Si8qPR3Uip6DPdmjT/DeDo+CwtJRYYRVM/gP8X6g7tMs0onB8Y2iW VMSubBCNeSa2CqvbG976lLawiZcvKEvnlMwOUtzC5VB7/nSvbWWKafbLz5YRr9/8 ijUxiQZnKBJZOQGQ5cdzJkRg+TQIfoVVwdSRi/su8rObh8YxI0BbYzv/QP+e9Pwr 8YZ6RjQ0/jeqNb6blBS2UL0BhQo2GoBuKICdK3FGEAuB2mXM0+Scvi2VV+rUpauJ RKhrTBFvZZuGQE/YelpoBOkvSEoljtkE7EVtE/twr5t/aAJT692dMTU7R6AjvSnr 3AbwRgo2655kmwzJOzCmp400Uvu+gTuk8w3xk6lQCca59yyx3q/AR0lUPMG0SryR 65w9UShhOwPp7iYIhTuDxwcNNATVADpcIMGjbvjf4VGKIHrEwPEoBPWhE40UqZdZ OQBM+GriEz1ydpW16CF7izT30x1S7bOlLYEf+rGHzkl3su70qjL/efyw9XMlbQtm zPzaOEBbqg0EpRTD6PpxS3gaIlV0RB8SD17sE/kJaGM8chaJXrE= =99Mv -----END PGP SIGNATURE----- --Xc55UVNU6ng6SKkv--