From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: vignesh C <vignesh21@gmail.com>
Cc: Zhihong Yu <zyu@yugabyte.com>
Cc: Corey Huinker <corey.huinker@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: simplifying foreign key/RI checks
Date: Thu, 11 Nov 2021 20:38:50 -0300
Message-ID: <202111112338.3icgjvnzgkbn@alvherre.pgsql> (raw)
In-Reply-To: <1623834.1636672752@sss.pgh.pa.us>
On 2021-Nov-11, Tom Lane wrote:
> It appears to me that commit 71f4c8c6f (DETACH PARTITION CONCURRENTLY)
> broke the semantics here, because now things work differently with a
> partitioned PK table than with a plain table, thanks to not bothering
> to distinguish questions of how to handle partition detachment from
> questions of visibility of individual data tuples. We evidently
> haven't got test coverage for this :-(, which is perhaps not so
> surprising because all this behavior long predates the isolationtester
> infrastructure that would've allowed us to test it mechanically.
>
> 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 think we (I) should definitely pursue fixing whatever was broken by
DETACH CONCURRENTLY, back to pg14, independently of this patch ... but
I would appreciate some insight into what the problem is.
--
Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/
"Find a bug in a program, and fix it, and the program will work today.
Show the program how to find and fix a bug, and the program
will work forever" (Oliver Silfridge)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, tgl@sss.pgh.pa.us, amitlangote09@gmail.com, vignesh21@gmail.com, zyu@yugabyte.com, corey.huinker@gmail.com, horikyota.ntt@gmail.com
Subject: Re: simplifying foreign key/RI checks
In-Reply-To: <202111112338.3icgjvnzgkbn@alvherre.pgsql>
References: <1623834.1636672752@sss.pgh.pa.us> <202111112338.3icgjvnzgkbn@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox