Re: regression, deadlock in high frequency single-row UPDATE

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Andrew Sackville-West <awest(at)janrain(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, hubert depesz lubaczewski <depesz(at)gmail(dot)com>, Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>, pgsql-bugs(at)postgresql(dot)org, Paulo Tanimoto <paulo(at)janrain(dot)com>
Subject: Re: regression, deadlock in high frequency single-row UPDATE
Date: 2014-12-09 17:43:20
Message-ID: 20141209174320.GE4922@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2014-12-09 09:38:33 -0800, Andrew Sackville-West wrote:
> On Tue, Dec 9, 2014 at 6:14 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
> wrote:
>
> > hubert depesz lubaczewski wrote:
> > > For whatever it's worth, I was able to bisect the problem to this commit:
> > >
> > > commit
> > > 0ac5ad5134f2769ccbaefec73844f8504c4d6182
> > >
> > > Author: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
> > >
> > > Date: Wed Jan 23 12:04:59 2013 -0300
> > >
> > > Improve concurrency of foreign key locking
> >
> > I'm not surprised in the least, TBH.
> >
> >
> Thanks for your attention to this. Is there anything we're doing wrong that
> could improve this in current 9.3 versions?

I don't think anybody can seriously can give you a serious workaround
until the issue has been diagnosed further.

One thing you could try would be to create a unique index that spans all
the columns in the table... That'd prevent usage of lower locklevels
added in the above commit.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-12-09 18:00:13 Re: BUG #12137: ORDER BY with expresion changes the output if added
Previous Message Andrew Sackville-West 2014-12-09 17:38:33 Re: regression, deadlock in high frequency single-row UPDATE