pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Always acquire expanded record descriptors early
Date: Mon, 09 Nov 2026 14:21:56 +0000
Message-ID: <E1xQQFw-000000003Ya-1svE@gemulon.postgresql.org> (raw)

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@vondra.me>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Security: CVE-2026-6460
Backpatch-through: 14

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4b7a4c2c9e62e94737d0175e5a05173a58d2264e
Author: Andres Freund <andres@anarazel.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(-)



view thread (3+ messages)  latest in thread

Message-ID: <E1xQQFw-000000003Ya-1svE@gemulon.postgresql.org>
Permalink:  ../E1xQQFw-000000003Ya-1svE@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xQQFw-000000003Ya-1svE@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: noah@leadboat.com
  Subject: Re: pgsql: Always acquire expanded record descriptors early
  In-Reply-To: <E1xQQFw-000000003Ya-1svE@gemulon.postgresql.org>
  References: <E1xQQFw-000000003Ya-1svE@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox