Re: Atomic/locked "allocation" of table row? - Mailing list pgsql-novice

From Tom Lane
Subject Re: Atomic/locked "allocation" of table row?
Date
Msg-id 27701.1186413563@sss.pgh.pa.us
Whole thread Raw
In response to Re: Atomic/locked "allocation" of table row?  (Sten Daniel Soersdal <netslists@gmail.com>)
List pgsql-novice
Sten Daniel Soersdal <netslists@gmail.com> writes:
> According to the manual it says that this would sometimes fail when
> "serializable" isolation cannot be obtained, is there any way to make it
> wait for it? Or do i have to wrap the transaction with an exception clause?

If you don't want it to fail on conflicts, don't use SERIALIZABLE.
Instead, use SELECT FOR UPDATE followed by UPDATE within a transaction.

            regards, tom lane

pgsql-novice by date:

Previous
From: Luca Ferrari
Date:
Subject: Re: doubt about datum
Next
From: Tom Lane
Date:
Subject: Re: doubt about datum