Re: [SQL] FOREIGN KEY and AccessExclusiveLock

2004-09-30 Thread Achilleus Mantzios
O Achilleus Mantzios έγραψε στις Sep 29, 2004 : > > Hmm, (something went wrong with some mailer) And again hope it gets right this time... > > Tom Lane wrote: > > We're adding a trigger to it. > >From the docs:

Re: [SQL] FOREIGN KEY and AccessExclusiveLock

2004-09-29 Thread Achilleus Mantzios
Hmm, (something went wrong with some mailer) Tom Lane wrote: > We're adding a trigger to it. >From the docs: ACCESS EXCLUSIVE Conflicts with locks of all modes (ACCESS SHARE, ROW SHARE, ROW EXCLUSIVE, SHARE UPDATE EX

Re: [SQL] FOREIGN KEY and AccessExclusiveLock

2004-09-28 Thread Achilleus Mantzios
O Tom Lane έγραψε στις Sep 28, 2004 : > Achilleus Mantzios <[EMAIL PROTECTED]> writes: > > Whats the purpose of the AccessExclusiveLock on parent table? > > We're adding a trigger to it. >From the docs: Acquired by the ALTER TABLE, DROP TABLE, REINDEX, CLUSTER, and VACUUM FULL commands. This is

Re: [SQL] FOREIGN KEY and AccessExclusiveLock

2004-09-28 Thread Achilleus Mantzios
O Tom Lane έγραψε στις Sep 28, 2004 : > Achilleus Mantzios <[EMAIL PROTECTED]> writes: > > Whats the purpose of the AccessExclusiveLock on parent table? > > We're adding a trigger to it. >From the docs: Acquired by the ALTER TABLE, DROP TABLE, REINDEX, CLUSTER, and VACUUM FULL commands. This i

Re: [SQL] FOREIGN KEY and AccessExclusiveLock

2004-09-28 Thread Tom Lane
Achilleus Mantzios <[EMAIL PROTECTED]> writes: > Whats the purpose of the AccessExclusiveLock on parent table? We're adding a trigger to it. regards, tom lane ---(end of broadcast)--- TIP 8: explain analyze is your friend

[SQL] FOREIGN KEY and AccessExclusiveLock

2004-09-28 Thread Achilleus Mantzios
Hi, all the below are for PostgreSQL 7.4.2. I noticed that during ALTER TABLE kid ADD CONSTRAINT "parcon" FOREIGN KEY (parid) on parent(id) pgsql tries to acquire an AccessExclusiveLock on *both* kid (which is pretty natural since it adheres with the docs, and it is an alter command) *and* pare