Re: Debugging deadlocks - Mailing list pgsql-general

From Guy Rouillier
Subject Re: Debugging deadlocks
Date
Msg-id CC1CF380F4D70844B01D45982E671B2348E79A@mtxexch01.add0.masergy.com
Whole thread Raw
In response to Debugging deadlocks  ("Guy Rouillier" <guyr@masergy.com>)
Responses Re: Debugging deadlocks  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-general
Alvaro Herrera wrote:
>
> Now this can't be applied right away because it's easy to run "out of
> memory" (shared memory for the lock table).  Say, a delete or update
> that touches 10000 tuples does not work.  I'm currently working on a
> proposal to allow the lock table to spill to disk ...

While not always true, in many cases the cardinality of the referenced
(parent) table is small compared to that of the referencing (child)
table.  Does locking require a separate lock record for each tuple in
the child table, or just one for each tuple in the parent table with a
reference count?  For example, the scenario I started this thread with
had two child tables referencing rows in a common parent table.  For a
given parent tuple, a single "prevent write" lock with a reference count
would seem sufficient.

--
Guy Rouillier


pgsql-general by date:

Previous
From: "Chandra Sekhar Surapaneni"
Date:
Subject: Help with converting hexadecimal to decimal
Next
From: "Dann Corbit"
Date:
Subject: Re: your thoughts on a crazy idea please