Re: [GENERAL] Foreign key and locking problem

2011-04-05 Thread Vick Khera
On Mon, Apr 4, 2011 at 4:18 PM, Edoardo Serra wrote: > At this point, client1 gives the following error: > ERROR: could not serialize access due to concurrent update > CONTEXT: SQL statement "SELECT 1 FROM ONLY "public"."people" x WHERE "id" > OPERATOR(pg_catalog.=) $1 FOR SHARE OF x" > > Is th

Re: [GENERAL] Foreign key and locking problem

2011-04-04 Thread Craig Ringer
On 04/05/2011 04:18 AM, Edoardo Serra wrote: Hi guys, I have a problem with the implicit "FOR SHARE" lock which postgres seems to get on the referenced record when there is a foreign key. I'm using postgres 8.3.3 from debian packages. [snip] At this point, client1 gives the following error:

[GENERAL] Foreign key and locking problem

2011-04-04 Thread Edoardo Serra
Hi guys, I have a problem with the implicit "FOR SHARE" lock which postgres seems to get on the referenced record when there is a foreign key. I'm using postgres 8.3.3 from debian packages. Here is a sample database structure and commands to reproduce. -- Test database structure CREATE TABLE p