> I don't buy that argument even for foreign keys --- and remember that
> pg_constraint will also hold entries for CHECK, UNIQUE, and PRIMARY KEY
> constraints. I don't want to have to take a global lock whenever we
> create an index.
I don't understand why a global lock is necessary -- and not simply a
lock on the pg_constraint table and the relations the constraint is
applied to (foreign key locks two, all others one).