agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols
6+ messages / 1 participants
[nested] [flat]

* pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/01db3f0398fd2e75569473fc910de5d76d1088b7

Modified Files
--------------
src/backend/catalog/heap.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e1830ebf52190ad48649c69ebd2a02fc5ba89366

Modified Files
--------------
src/backend/catalog/heap.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/713bce9484dea8bce93ec7abacd0e47ddf30dcf5

Modified Files
--------------
src/backend/catalog/heap.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/526d9ca619cc466fd637a7545c0d3ad3ea7bc6cf

Modified Files
--------------
src/backend/catalog/heap.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d2f58c42a2613cc65cddd7a223f85b6bfc0093fb

Modified Files
--------------
src/backend/catalog/heap.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2026-04-23 18:48 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-04-23 18:48 pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-04-23 18:48 pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-04-23 18:48 pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-04-23 18:48 pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-04-23 18:48 pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-04-23 18:48 pgsql: Don't call CheckAttributeType() with InvalidOid on dropped cols Heikki Linnakangas <heikki.linnakangas@iki.fi>

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