From 8d5a733fa48dbf5a97ca48be8a71af7c1431f8d5 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 11 Aug 2026 15:47:27 +0200 Subject: [PATCH 2/2] doc: Document overflow handling of pg_class.relpages etc. The pg_class fields relpages, relallvisible, and relallfrozen are stored as int32 in the catalog but block numbers are internally of type uint32. This all works correctly because the values are implicitly converted back and forth according to C conversion rules. But this was apparently never explicitly documented, so add this. --- doc/src/sgml/catalogs.sgml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index 6066c4784f4..b6e61196922 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -2057,6 +2057,10 @@ <structname>pg_class</structname> Columns planner. It is updated by VACUUM, ANALYZE, and a few DDL commands such as CREATE INDEX. + + + This is effectively an unsigned 32-bit integer. Values larger than + 2^31−1 are stored as negative values. @@ -2086,6 +2090,10 @@ <structname>pg_class</structname> Columns planner. It is updated by VACUUM, ANALYZE, and a few DDL commands such as CREATE INDEX. + + + This is effectively an unsigned 32-bit integer. Values larger than + 2^31−1 are stored as negative values. @@ -2106,6 +2114,10 @@ <structname>pg_class</structname> Columns ANALYZE, and a few DDL commands such as CREATE INDEX. + + + This is effectively an unsigned 32-bit integer. Values larger than + 2^31−1 are stored as negative values. -- 2.55.0