Re: Scope of constraint names

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Taylor <rbt(at)zort(dot)ca>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Scope of constraint names
Date: 2002-07-04 04:29:17
Message-ID: 29757.1025756957@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rod Taylor <rbt(at)zort(dot)ca> writes:
>> 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 --

To be sure we are creating a unique constraint name.

> 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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-07-04 04:47:38 Re: Compiling PostgreSQL with Intel C Compiler 6.0
Previous Message Tom Lane 2002-07-04 04:23:17 Re: I am being interviewed by OReilly