public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: Paul Jungwirth <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: jian he <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Cc: vignesh C <[email protected]>
Subject: Re: SQL:2011 application time
Date: Mon, 27 Jan 2025 16:56:18 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CA+renyUApHgSZF9-nd-a0+OPGharLQLO=mDHcY4_qQ0+noCUVg@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<5f0c25de-2c13-4fb5-a4df-a1e03c43cd14@illuminatedcomputin! g.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On 24.01.25 00:20, Paul Jungwirth wrote:
> What about caching the FK's query plan? Could the RESTRICT test ever
> reuse the constraint oid from the NO ACTION tests just above it? I'm
> pretty sure that's not supposed to happen, but if it used a plan
> generated from the NO ACTION SQL, it would exhibit the behavior we're
> seeing. It also makes sense why it only appeared after 1772d554b0.
I think this call in ri_restrict()
ri_BuildQueryKey(&qkey, riinfo, RI_PLAN_RESTRICT);
needs to use a different third argument for NO ACTION vs. RESTRICT,
since we are now sometimes using different queries for them.
However, the RI_QueryKey also uses the constraint OID as part of the
hash key, so even this mistake would not trigger any bad effect unless
we also have OID collisions?
I'm also not able to reproduce this exact regression.diffs pattern by
messing with various conditionals in ri_restrict(), to intentionally
cause a confusion between the NO ACTION and RESTRICT cases.
Nevertheless, this line of investigation seems most plausible to me at
the moment.
view thread (23+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: SQL:2011 application time
In-Reply-To: <[email protected]>
* 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