Always acquire expanded record descriptors early Only make_expanded_record_from_datum() deferred tuple descriptor lookup, and it has no direct/indirect users in core nor in known open source extensions (checked via pgxn and github). The other ERH constructors already acquire a descriptor eagerly.
The main reason for this change is that subsequent commits are simplified by it. This also allows implementing the datum constructor using make_expanded_record_from_typeid(), removing a good bit of duplicated code. This preserves ABI compatibility, to allow for backpatching. Reviewed-by: Tomas Vondra <[email protected]> Reviewed-by: Melanie Plageman <[email protected]> Security: CVE-2026-6460 Backpatch-through: 14 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7209daf6166e44ed97f56a3c8d9b84c90831facf Author: Andres Freund <[email protected]> Modified Files -------------- src/backend/utils/adt/expandedrecord.c | 158 ++++----------------------- src/include/utils/expandedrecord.h | 15 +-- src/test/regress/expected/rowtypes_alter.out | 2 +- 3 files changed, 27 insertions(+), 148 deletions(-)
