agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Minimize footprint of TOAST_MAX_CHUNK_SIZE in heap and amcheck c
Date: Thu, 03 Sep 2026 22:54:12 +0000
Message-ID: <E1x2GJv-00000003NAM-20Q3@gemulon.postgresql.org> (raw)
Minimize footprint of TOAST_MAX_CHUNK_SIZE in heap and amcheck code
This refactoring eases a little bit a follow-up change to add support
for 8-byte TOAST value IDs, as the maximum chunk size allowed for a
single chunk of TOASTed data depends on the size of varatt_external, its
value ID being part of it.
It is worth noting that TOAST_MAX_CHUNK_SIZE resolves as a uintptr_t, so
the previous calculations were in 64-bit unsigned arithmetic. These are
now done in int32, which still works the same way due to an external
TOAST value being bounded to 1GB.
Author: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Yugo Nagata <nagata@sraoss.co.jp>
Reviewed-by: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Discussion: https://postgr.es/m/CALj2ACVnO6jjs5aRx3dSOBy9LV7=iakPBR1eOvoeB8rL8Q47zg@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2b3d11aaed891958f24aed05bf454524d603b6ea
Modified Files
--------------
contrib/amcheck/verify_heapam.c | 13 +++++++++----
src/backend/access/heap/heaptoast.c | 20 ++++++++++++--------
2 files changed, 21 insertions(+), 12 deletions(-)
Message-ID: <E1x2GJv-00000003NAM-20Q3@gemulon.postgresql.org>
Permalink: ../E1x2GJv-00000003NAM-20Q3@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1x2GJv-00000003NAM-20Q3@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Minimize footprint of TOAST_MAX_CHUNK_SIZE in heap and amcheck c
In-Reply-To: <E1x2GJv-00000003NAM-20Q3@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox