agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols
Date: Thu, 23 Apr 2026 18:48:42 +0000
Message-ID: <E1wFz6P-002NKW-1n@gemulon.postgresql.org> (raw)
Don't call CheckAttributeType() with InvalidOid on dropped cols
If CheckAttributeType() is called with InvalidOid, it performs a bunch
of pointless, futile syscache lookups with InvalidOid, but ultimately
tolerates it and has no effect. We were calling it with InvalidOid on
dropped columns, but it seems accidental that it works, so let's stop
doing it.
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/93ce56cd-02a6-4db1-8224-c8999372facc@iki.fi
Backpatch-through: 14
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/d54e75441518da3207fa5a44f34d300956d3c2c2
Modified Files
--------------
src/backend/catalog/heap.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
view thread (6+ messages)
Message-ID: <E1wFz6P-002NKW-1n@gemulon.postgresql.org>
Permalink: ../E1wFz6P-002NKW-1n@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wFz6P-002NKW-1n@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 using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols
In-Reply-To: <E1wFz6P-002NKW-1n@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox