Hello

I rechecked Depesz's article -
http://www.depesz.com/2011/07/01/waiting-for-9-2-not-valid-checks/

The behave of current HEAD is different than behave described in article.

"alter table a validate constraint a_a_check" needs a access exclusive
locks and blocks table modification - I tested inserts.

Is it expected behave.

session one:

postgres=# create table a(a int);
CREATE TABLE
postgres=# alter table a add check (a > 0) not valid;
ALTER TABLE
postgres=# begin;
BEGIN
postgres=# alter table a validate constraint a_a_check;
ALTER TABLE

session two:

postgres=# update a set a = 100; -- it waits to commit in session one

Regards

Pavel Stehule

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to