model-writtenrun 4612 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut proposed narrowing attstattarget and attinhcount from int32 to int16 and reordering pg_attribute to save four bytes, noting that statistics targets were already capped at 10000 and inheritance counts might need overflow protection #1.
- Tom Lane questioned restricting future statistics targets, while Tomas Vondra proposed nullable storage for default targets; Tom supported that alternative and suggested considering nullable inheritance counts too #2 #3 #4.
- David Rowley supplied historical evidence that 16-bit inheritance counts could suffice, and Andres Freund argued that larger statistics targets would require broader changes anyway and suggested also narrowing attndims #5 #6 #8.
- Peter explained that the immediate aim was to recover space for a PostgreSQL 16 feature, leaving substantial separation of pg_attribute from tuple descriptors for later work; Andres calculated that narrowing all three fields still saved only four bytes because of padding #9 #11 #12.
- Andres also proposed removing attcacheoff and packing boolean fields, but Matthias van de Meent described benefits from cached offsets in index access and reported historical index-rebuild slowdowns of 4–18% without them; Tom suggested relocating cached offsets into local slot state #12 #14 #15 #17 #20.
- When Peter asked whether attcacheoff itself could become int16, Matthias explained that serialized tuples with many attributes can require offsets beyond that range #21 #22.
- Peter's revised patch narrowed attndims, attstattarget, attinhcount, and the corresponding constraint inheritance count, adding overflow checks; he deferred nullable fields and boolean packing because of their extensive consequences, and kept the unresolved attcacheoff discussion separate #23.
- Peter committed the revised patch as 90189eefc1, adding only a catalog-version bump beyond the attached changes, and closed the thread by confirming the landing; the broader tuple-descriptor and attcacheoff redesigns remained outside this patch #23 #24.