| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Always acquire expanded record descriptors early |
| Date: | 2026-11-09 14:21:51 |
| Message-ID: | E1xQQFr-000000003OD-3Uu1@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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 <tomas(at)vondra(dot)me>
Reviewed-by: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Security: CVE-2026-6460
Backpatch-through: 14
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/bcaef7edb41650e0648757307c100f771ebad8ad
Author: Andres Freund <andres(at)anarazel(dot)de>
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(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Noah Misch | 2026-11-09 14:21:52 | pgsql: Avoid use-after-free hazards in re-entrant use of pltcl. |
| Previous Message | Noah Misch | 2026-11-09 14:21:50 | pgsql: Teach equalRowTypes() to safely handle dropped columns. |