From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't crash on reference to an un-available system column.
Date: Thu, 22 Apr 2021 21:31:11 +0000
Message-ID: <E1lZgul-00060Q-QU@gemulon.postgresql.org> (raw)
Don't crash on reference to an un-available system column.
Adopt a more consistent policy about what slot-type-specific
getsysattr functions should do when system attributes are not
available. To wit, they should all throw the same user-oriented
error, rather than variously crashing or emitting developer-oriented
messages.
This closes a identifiable problem in commits a71cfc56b and
3fb93103a (in v13 and v12), so back-patch into those branches,
along with a test case to try to ensure we don't break it again.
It is not known that any of the former crash cases are reachable
in HEAD, but this seems like a good safety improvement in any case.
Discussion: https://postgr.es/m/141051591267657@mail.yandex.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d479d00285255d422a2b38f1cfaa35808968a08c
Modified Files
--------------
src/backend/executor/execTuples.c | 40 +++++++++++++++++++++++----
src/test/regress/expected/update.out | 53 ++++++++++++++++++++++++++++++++++++
src/test/regress/sql/update.sql | 32 ++++++++++++++++++++++
3 files changed, 120 insertions(+), 5 deletions(-)
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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Don't crash on reference to an un-available system column.
In-Reply-To: <E1lZgul-00060Q-QU@gemulon.postgresql.org>
References: <E1lZgul-00060Q-QU@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