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