From 74b89f8f968de13d653642b0a21521d20b71af61 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Wed, 23 Sep 2026 19:56:45 +0900 Subject: [PATCH] doc: Mention oid8 TOAST values in the limits appendix limits.sgml mentioned the limit related to oid values in TOAST tables, where up to 2^32 out-of-line values can be stored. This section did not mention oid8 values, able to lift this limitation, for up to 2^64 out-of-line values. Oversight in 6e58d6356fcb. Reported-by: John Naylor Author: Bharath Rupireddy Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/CANWCAZa+pWZL1Zjep1pz1F0sVWwNOQf+QfGErOaiUvC10Yr2XA@mail.gmail.com --- doc/src/sgml/limits.sgml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/limits.sgml b/doc/src/sgml/limits.sgml index f26f4466719..7f7eb51985e 100644 --- a/doc/src/sgml/limits.sgml +++ b/doc/src/sgml/limits.sgml @@ -123,10 +123,11 @@ Variable-length fields of types such as text, varchar, and char can have their values stored out of line in the table's TOAST table when the - values are large enough to require it. Only an 18-byte pointer must remain - inside the tuple in the table's heap. For shorter length variable-length - fields, either a 4-byte or 1-byte field header is used and the value is - stored inside the heap tuple. + values are large enough to require it. Only an 18-byte or 22-byte TOAST + pointer must remain inside the tuple in the table's heap, depending on + whether the TOAST table uses OID or OID8 values, respectively. For shorter + length variable-length fields, either a 4-byte or 1-byte field header is used + and the value is stored inside the heap tuple. @@ -145,5 +146,8 @@ can become expensive, in turn slowing down INSERT/UPDATE statements. Typically, this is only an issue for tables containing many terabytes of data; partitioning is a possible workaround. + A TOAST table using OID8 values does not have this issue as it can store up + to 2^64 out-of-line values. New identifiers are assigned without searching + for a free one. See .