Re: simplifying foreign key/RI checks - Mailing list pgsql-hackers

From Tom Lane
Subject Re: simplifying foreign key/RI checks
Date
Msg-id 1634390.1636682302@sss.pgh.pa.us
Whole thread Raw
In response to Re: simplifying foreign key/RI checks  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: simplifying foreign key/RI checks
List pgsql-hackers
I wrote:
> Anyway, I think that (1) we should write some more test cases around
> this behavior, (2) you need to establish the snapshot to use in two
> different ways for the RI_FKey_check and ri_Check_Pk_Match cases,
> and (3) something's going to have to be done to repair the behavior
> in v14 (unless we want to back-patch this into v14, which seems a
> bit scary).

I wrote that thinking that point (2), ie fix the choice of snapshots for
these RI queries, would solve the brokenness in partitioned tables,
so that (3) would potentially only require hacking up v14.

However after thinking more I realize that (2) will break the desired
behavior for concurrent partition detaches, because that's being driven
off ActiveSnapshot.  So we really need a solution that decouples the
partition detachment logic from ActiveSnapshot, in both branches.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: XLogReadRecord() error in XlogReadTwoPhaseData()
Next
From: "houzj.fnst@fujitsu.com"
Date:
Subject: RE: [BUG]Invalidate relcache when setting REPLICA IDENTITY