NOT VALID FKs and Constraints

Lists: pgsql-hackers
From: Cody Cutrer <cody(at)instructure(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: NOT VALID FKs and Constraints
Date: 2013-01-24 18:11:45
Message-ID: CA+=qeWs_xtLOu5xg6nT=67YmkFjtAQ_98tFs0vUob-hRU+4Quw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

9.1 introduced delayed validation on FKs, and 9.2 on table constraints,
however neither one has been useful due to lesser-locks on ALTER TABLE
being reverted (see
http://www.postgresql.org/message-id/1330350691-sup-1@alvh.no-ip.org),
preventing the lock benefits during the VALIDATE stage.

I don't see any commits since then about either one. Is fixing this still
on the radar for 9.3? Also, is a similar feature planned (for 9.3 or
further out) for NOT NULL column constraints?

Thanks,

Cody Cutrer


From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Cody Cutrer <cody(at)instructure(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: NOT VALID FKs and Constraints
Date: 2013-01-25 14:31:18
Message-ID: 20130125143117.GA5584@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Cody Cutrer wrote:
> 9.1 introduced delayed validation on FKs, and 9.2 on table constraints,
> however neither one has been useful due to lesser-locks on ALTER TABLE
> being reverted (see
> http://www.postgresql.org/message-id/1330350691-sup-1@alvh.no-ip.org),
> preventing the lock benefits during the VALIDATE stage.
>
> I don't see any commits since then about either one. Is fixing this still
> on the radar for 9.3?

Not for 9.3. There are some related discussions, but at the earliest it
will happen for 9.4.

> Also, is a similar feature planned (for 9.3 or further out) for NOT
> NULL column constraints?

There are some discussions and patch about this, but it's not complete
yet. It might happen for 9.4.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services