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 1wtDZU-00144N-0U for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Aug 2026 00:08:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wtDZS-00EPOu-1G for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Aug 2026 00:08:49 +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 1wtDZS-00EPOm-0H for pgsql-hackers@lists.postgresql.org; Mon, 10 Aug 2026 00:08:49 +0000 Received: from fout-b3-smtp.messagingengine.com ([202.12.124.146]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wtDZP-000000016TF-2JXP for pgsql-hackers@lists.postgresql.org; Mon, 10 Aug 2026 00:08:48 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id E66FC1D001C4; Sun, 9 Aug 2026 20:08:45 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Sun, 09 Aug 2026 20:08:46 -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=fm3; t=1786320525; x=1786406925; bh=lisAv2Vpm2 NmhX/BwRB7R12eLA5coSvH9jqKDAjUPo4=; b=TuS71XiDU7c1nFjEZ/4CLLk7KD IT49T2wXXkUKToNhpabeD5pLQRcRFDJeahJd9wH7dHyXt9Ek+/Xu+7U+ZSMaC5eG 4wMnKe5PcGf2Om59jkRxTFcnoMvo27X6Jq6pa5lkZTTKw+b9VyjMPdz5AwXrwVv8 hZu6zL82OZyMadgjCOvng5l3aDqk43HmihtpIWwpkakQTvWnNUUwB8Ndo6k4otHo rWlBQec5xVC8IuXZcyktcRWTXIbASzeOoEt2r8qZtDLFtTo+/4m2mU1To3xkWvnT M+UNN0w+R2WtVDC+Txt6Dxs3OEOEJ9L3QaKE2UwNtVwP9BZ21YvTzNmdiFeA== 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=fm3; t= 1786320525; x=1786406925; bh=lisAv2Vpm2NmhX/BwRB7R12eLA5coSvH9jq KDAjUPo4=; b=GAYEwFFcAnNKtH9VMxbmNOQ4bs9244mXUuHGhBV3hEds2X4khlW xLNT0f/j+imKFWoiin4HsqjKQsg2aGKyUI4YnoBvCWnsYemWnpOLGFIfbqS1Sr6N e6tjyO+BbXCpwiaaKhrDKK28mjECaGVmY4eSKQk5rwEJjFBy6dwex6v6LMqsp/qt rjafhWWwp6jVhHvEJdqmp6PVNkJ9BHXl/BBEdgJ10VNIb8luYfynSBFYsnFWX73F y2RCv41S0ZLP+T6GdVizWkyq/krz8WmkNYbe9k1BlkEJybs+XmvTqOmwHwfoiQCR Rw3Qun57Fe/UeR3PARD3vKTTMLB8y/JZwnA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGX9VypiOx/5cGDAKG5Uy+HR/TCx3ue7bKpLZCriyMPxcKX1/MoSWQnvt8sqDlAaF 3WDghN0Q5OTp/wcS/gYRbRiwXiZPVqNZXAqBlckXgE9uMClrfKpy+OwBSZVNqaRAaDjIHZ jELmE9rnWedDSFeK96R1duASE0iurJPyMdT36F9nLPz27R5XGEUfHlBtCYJOZm83ixN7y2 FZqcmsFKKFh/bzi2FOJMJRgUJKhZv+dPrBfgGIt4CW6Tyk2R6VaDktxCv/nuh5P7toDWjC WBZGAMp9NH/ET9XmmKRt2XGR7H8KntPurf0j3jJQNug8C+QBwiE8bJeK4oVwy/TNdKIOEV 5MNgFHiOp2Sv2K/mYeM1L127KbRAFewfzukUIvFH8HHXgpKpT+ucC6FJn1XcI/iTofz1N8 y833sFW12SmQz32+NmGGE9dKszJAS6n2yu9OnAtUrMZWS/ukBXebj6Xj9/Rz3y2VzD0CKs DiQB/X6rRoyUxkVgvdePX18VbnEv8Y1QipiZWeK5VDeiRQroQvWPitOAIDvLAM3kuqKDHs OST7xzrSO5suxL5EU5XJW/1mqrAoDtVgfIMHwrr+KWIsj6YA0kLY43JrnaGQZXQ37whAQr razi997M+VPIaubFjRLVuwMiPiKpEyghotEPAwe6OznZsENChozI48va1VTw X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 9 Aug 2026 20:08:43 -0400 (EDT) Date: Mon, 10 Aug 2026 09:08:40 +0900 From: Michael Paquier To: Hannu Krosing Cc: Yugo Nagata , Postgres hackers Subject: Re: Support for 8-byte TOAST values, round two Message-ID: References: <20260730133818.a775f48723ffea5118794b2a@sraoss.co.jp> <20260730170102.15b4aded1698dee3c2a304e2@sraoss.co.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="S4ERg3NMbFMW5HaJ" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --S4ERg3NMbFMW5HaJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Aug 09, 2026 at 11:53:23PM +0200, Hannu Krosing wrote: > I understand from some earlier messages that in one of the patches you > refactored the code to make it easier to add new VARLENA on disk > types. (Top-posting?) > Where should I start looking for this? Quoting the top message of the thread: ``` The main feedback of the previous thread is that the previous implementation with its callbacks for each vartag was not liked much, and their were concerns with pointer redirections and performance. This patch set uses what I am calling the "brutal" approach, relying on a vartag_external of a varlena or the atttype of the TOAST relation to decide which external toast pointer we should use. This uses no function pointers, and patches the code to deal with Oid or Oid8 TOAST values where it matters. So, this time, performance cannot really be an issue. ``` The refactoring worked around a set of callbacks that could be assigned to specific vartag_external, and one of the feedback that I got is that this required function pointers, which could impact performance for bulk-read or bulk-write of TOAST data. This refactoring is gone as of round two, switching to direct if/elif block. Overall the result is not that bad, as long as one is aware of all the code paths that need to be handled on HEAD. -- Michael --S4ERg3NMbFMW5HaJ Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmp5FogACgkQnvQgOdby QH0uDA//WrouRp4xr68Lo1HrpD4o1GTsBx/al4FZYrE98vUITXvjkq/fU7emmIGM YZoBIjY2xb9j+xsMQNopkgnomt0WYaY1hgzF1gwV4S0QWVK7875+YhMuDfz9gMzJ Ax5Xpn61mICFniSq0jjbPfL+8gIEZdbE4YZTs15NKNOZ9wY5lI5I9CBwQaxMDrXs onKkM55NrsPErgyWuMOsiktQHTpGdpDSMOHT7lLl8TQk6C8zPkH1AMdUxkPIxNsn Kd6q4DVeDG7835sqATrdZLBfRAVQti4vFPGQ4Y1WFKfuy+DU9h+ZGmO7FGPhNhEW sNO7coPyhHCHZotPprQPk3FwBkx0QVYdL1ix/ZKv4UKhPYoLhsuhjPFPiyl5r2kb MabbmIBcC57xTlLu9kBSdB+H9qwU4KokWWyxbK1R2T+WCZEi5nm7RQkMnhEIda+t ewb2lc9dEFYo4AGy/nPJFE2C1FLOqRZ1mNectz76CST54ZI6c3+JxyiXTQ5trRFY 1iY3WVhYVYmjHNv4ysCRfdbAnem/uYSUXXH9wAYaA1IBIjpfXedA2QGCSEO6cqmz A9dHnOQ2j6IPCdUI+W8HOnw5clF7fUQo+npCiBmIIZwvFZDP/43D4TAr3TNoUXK3 hqQBuEZG3LzIIsiQYVfOIDVX8YmsU0vNWLF/BmM5Eun040031Xc= =syXd -----END PGP SIGNATURE----- --S4ERg3NMbFMW5HaJ--