Re: SPGist "triple parity" concept doesn't work

From: Greg Stark <stark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, pgsql-hackers(at)postgresql(dot)org, hailong(dot)li(at)qunar(dot)com
Subject: Re: SPGist "triple parity" concept doesn't work
Date: 2013-06-06 22:32:49
Message-ID: CAM-w4HPV5uqrFpo4=N44H3BYObqiRDtkbFELgqJCPq6QGPsLjA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 6, 2013 at 10:46 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2013-06-06 22:42:11 Re: Hard limit on WAL space used (because PANIC sucks)
Previous Message Greg Stark 2013-06-06 22:28:10 Re: Freezing without write I/O