Re: SPGist "triple parity" concept doesn't work - Mailing list pgsql-hackers

From Greg Stark
Subject Re: SPGist "triple parity" concept doesn't work
Date
Msg-id CAM-w4HPV5uqrFpo4=N44H3BYObqiRDtkbFELgqJCPq6QGPsLjA@mail.gmail.com
Whole thread Raw
In response to SPGist "triple parity" concept doesn't work  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SPGist "triple parity" concept doesn't work
List pgsql-hackers
On Thu, Jun 6, 2013 at 10:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>  To prevent
> : deadlocks we introduce a concept of "triple parity" of pages: if inner tuple
> : is on page with BlockNumber N, then its child tuples should be placed on the
> : same page, or else on a page with BlockNumber M where (N+1) mod 3 == M mod 3.
> : This rule guarantees that tuples on page M will have no children on page N,
> : since (M+1) mod 3 != N mod 3.

Even if the invariant was maintained why doesn't that just mean you
need three concurrent inserts to create a deadlock?


-- 
greg



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Freezing without write I/O
Next
From: Ants Aasma
Date:
Subject: Proposal for CSN based snapshots