Re: Scope of constraint names - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: Scope of constraint names
Date
Msg-id 1025783990.250.115.camel@jester
Whole thread Raw
In response to Re: Scope of constraint names  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Scope of constraint names
List pgsql-hackers
> > and not simply a lock on the pg_constraint table
> 
> In this context, a lock on pg_constraint *is* global, because it will
> mean that no one else can be creating an index on some other table.
> They'd need to hold that same lock to ensure that *their* chosen
> constraint name is unique.

So I am understanding correctly.

I think it would be a rare event to have more than one person changing
the database structure at the same time.  Anyway, the index example is a
bad example isn't it?  It already takes an lock on pg_class which is
just as global.

Check constraints and foreign key constraints are two that I can see
affected in the manner described.


Anyway, my current implementation has constraint names unique to the
relation only -- not the namespace, although my locking may be excessive
in that area.





pgsql-hackers by date:

Previous
From: Raymond Fung
Date:
Subject: ecpg problem : pre-processor translated long constant to char
Next
From: Bruce Momjian
Date:
Subject: Re: BETWEEN Node & DROP COLUMN