From: | Scott Ribe <scott_ribe(at)killerbytes(dot)com> |
---|---|
To: | Dr NoName <spamacct11(at)yahoo(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: postgresql locks the whole table! |
Date: | 2003-12-03 18:46:02 |
Message-ID: | BBF37D7A.3B731%scott_ribe@killerbytes.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> My question is why??? The two insert operations do not
> conflict with each other (at least not in the
> real-world situation). Also, why does the foreign key
> make a difference?
I don't know if this would help, but given the other explanations you've
gotten I would try setting the foreign key constraint to deferrable, then at
the beginning of the transaction defer constraints. The reasoning being that
if the check is deferred until commit, maybe the lock won't be taken until
commit, thus the window of time during which your 2 example inserts could
conflict would be more like what you expect, a brief instant.
--
Scott Ribe
scott_ribe(at)killerbytes(dot)com
http://www.killerbytes.com/
(303) 665-7007 voice
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stone | 2003-12-03 19:05:17 | C/C++ access with no postmaster running? |
Previous Message | Marco Colombo | 2003-12-03 18:27:59 | Re: disaster recovery |