Re: Trigger and deadlock

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: Loïc Rollus *EXTERN* <loicrollus(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trigger and deadlock
Date: 2013-07-30 07:19:00
Message-ID: A737B7A37273E048B164557ADEF4A58B17BF1E21@ntex2010a.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2013-07-30 07:38:49 Reddwarf for PostgreSQL?
Previous Message Javier de la Torre 2013-07-30 07:16:19 Re: Event trigger information accessibility on plpgsql