pgsql: Cache NO ACTION foreign keys separately from RESTRICT foreign ke

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Cache NO ACTION foreign keys separately from RESTRICT foreign ke
Date: 2025-02-09 13:04:14
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Cache NO ACTION foreign keys separately from RESTRICT foreign keys

Now that we generate different SQL for temporal NO ACTION vs RESTRICT
foreign keys, we should cache their query plans with different keys.
Since the key also includes the constraint oid, this shouldn't be
necessary, but we have been seeing build farm failures that suggest we
might be sometimes using a cached NO ACTION plan to implement a RESTRICT
constraint.

Author: Paul A. Jungwirth <pj(at)illuminatedcomputing(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mDHcY4_qQ0+noCUVg(at)mail(dot)gmail(dot)com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9926f854d07784d72aada16c8038b558fbc45d13

Modified Files
--------------
src/backend/utils/adt/ri_triggers.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-02-09 18:59:17 pgsql: Release notes for 17.3, 16.7, 15.11, 14.16, 13.19.
Previous Message Peter Eisentraut 2025-02-09 11:44:09 pgsql: Make TLS write functions' buffer arguments pointers const