Concurrency problem - Mailing list pgsql-sql

From Taral
Subject Concurrency problem
Date
Msg-id Pine.LNX.4.10.10002040529580.10043-100000@r149127-2815.dobiecenter.com
Whole thread Raw
Responses Re: [SQL] Concurrency problem  (wieck@debis.com (Jan Wieck))
List pgsql-sql
I have a small problem, and was wondering if there was a better fix than
the one I have.

Here goes: I have tables A and B, both with primary keys. A has a field
which refers to rows of B, and vice versa. When these fields are modified,
I want to ensure referential integrity, but without using triggers. Is it
possible to avoid deadlock and preserve integrity in all situations
without serializing the updates?

Details: Without any locking, an update of A concurrent with a delete on B
will cause an integrity breach. With locking, concurrent updates of A and
B can cause a deadlock...

Taral 



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] Install: Undefined symbol `_TAS'
Next
From: wieck@debis.com (Jan Wieck)
Date:
Subject: Re: [SQL] Concurrency problem