Thread: NOT VALID FKs and Constraints

NOT VALID FKs and Constraints

From
Cody Cutrer
Date:
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

Re: NOT VALID FKs and Constraints

From
Alvaro Herrera
Date:
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