Document limit on the number of out-of-line values per table
authorJohn Naylor <[email protected]>
Tue, 20 Aug 2024 03:02:34 +0000 (10:02 +0700)
committerJohn Naylor <[email protected]>
Tue, 20 Aug 2024 06:36:33 +0000 (13:36 +0700)
Document the hard limit stemming from the size of an OID, and also
mention the perfomance impact that occurs before the hard limit
is reached.

Jakub Wartak and Robert Haas
Backpatch to all supported versions

Discussion: https://postgr.es/m/CAKZiRmwWhp2yxjqJLwbBjHdfbJBcUmmKMNAZyBjjtpgM9AMatQ%40mail.gmail.com

doc/src/sgml/limits.sgml

index c549447013fd507d81400495ddcb5647b70b9443..f26f4466719a5de0b081af25617dc976d48a4fdc 100644 (file)
   created tuples are internally marked as null in the tuple's null bitmap, the
   null bitmap also occupies space.
  </para>
+
+ <para>
+  Each table can store a theoretical maximum of 2^32 out-of-line values; see
+  <xref linkend="storage-toast" /> for a detailed discussion of out-of-line
+  storage. This limit arises from the use of a 32-bit OID to identify each
+  such value. The practical limit is significantly less than the theoretical
+  limit, because as the OID space fills up, finding an OID that is still free
+  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.
+ </para>
 </appendix>