Re: Excessive Deadlocks On Concurrent Inserts to Shared Parent Row

From: Vick Khera <vivek(at)khera(dot)org>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Excessive Deadlocks On Concurrent Inserts to Shared Parent Row
Date: 2010-06-18 14:59:31
Message-ID: AANLkTikI_WJbM5io3v44qP6iGPILySLUigk874WgPbzu@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 17, 2010 at 2:14 PM, Marvin S. Addison <serac(at)vt(dot)edu> wrote:
> My impression at present is that the fundamental locking behavior of
> PostgreSQL is poorly suited to applications that have both great deals of
> concurrency and referential integrity.  This is of concern to us as we are
> considering migrating to PostgreSQL from Oracle for other applications.  I
> realize that application design changes could possibly mitigate this
> problem, but I would argue that this case is so common that it ought to be
> handled better.
>

I see a performance problems from the FK locks but rarely do we get
deadlocks. Are you running in SERIALIZABLE mode?

Our issues come mostly from updating status rows related to the parent
record. I ended up having to send all of those requests through a
work queue and having a single process apply them, but now I have the
bottleneck of that single thread applying a *lot* of updates.

I'm wating on Greg Smith to finish up his book so he can dive into
solving this FK locking problem for me once and for all.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-06-18 15:00:22 Re: Unable to determine what has a particular OID
Previous Message Andy Dale 2010-06-18 14:51:41 Re: Unable to determine what has a particular OID