Re: Trigger and deadlock - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Trigger and deadlock
Date
Msg-id A737B7A37273E048B164557ADEF4A58B17BF1E21@ntex2010a.host.magwien.gv.at
Whole thread Raw
In response to Re: Trigger and deadlock  (Loïc Rollus <loicrollus@gmail.com>)
List pgsql-general
Loïc Rollus wrote:
> It's ok.
> Before the insert, The foreign key constraint locked the row. If transaction A and B lock the row with
> FK, before doing UPDATE, they were stuck.
> I found a solution by creating an "before insert" trigger with a simple SELECT FROM UPDATE on the row.

You mean "SELECT FOR UPDATE", richt?

Great that you could figure out where the problem was.

Yours,
Laurenz Albe

pgsql-general by date:

Previous
From: Javier de la Torre
Date:
Subject: Re: Event trigger information accessibility on plpgsql
Next
From: Tatsuo Ishii
Date:
Subject: Reddwarf for PostgreSQL?