| 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:22:01 |
| Message-ID: | E1xQQG1-000000003j9-2Nn1@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
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d835dc88d8d60816f2261128326673b11d52f0c1
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:22:02 | pgsql: Fix PL/Perl to cope with errors thrown from tied structures. |
| Previous Message | Noah Misch | 2026-11-09 14:22:00 | pgsql: Enforce view row visibility for INSERT ... ON CONFLICT target ro |