Re: Allow NOT VALID foreign key constraints on partitioned tables.

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Álvaro Herrera <alvherre@alvh.no-ip.org>
To: "Alexander Lakhin" <exclusion@gmail.com>, "Amul Sul" <sulamul@gmail.com>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2025-01-25T10:29:13Z
Lists: pgsql-hackers
On Sat, Jan 25, 2025, at 6:00 AM, Alexander Lakhin wrote:
> Hello Álvaro,
> 
> Please look at the script that produces an error starting from b663b9436:

Ah yes, this is my bug: I moved a CCI where it became conditional. Will fix, thanks for the test case.

Commits

  1. Add missing CommandCounterIncrement

  2. Fix instability in recently added regression tests

  3. Allow NOT VALID foreign key constraints on partitioned tables

  4. Split ATExecValidateConstraint into reusable pieces