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: Amul Sul <sulamul@gmail.com>
Cc: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2025-01-23T15:04:32Z
Lists: pgsql-hackers
On 2025-Jan-22, Amul Sul wrote:

> You’re correct; it’s fixed in the attached version, along with an
> assert(!convalidated) in QueueFKConstraintValidation(), and I’ve
> included tests to cover the change. Thanks for reviewing this patch.

OK thanks, looks good, I have pushed it now with some trivial
amendments.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Java is clearly an example of money oriented programming"  (A. Stepanov)



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