Re: Auto Partitioning - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Auto Partitioning
Date
Msg-id 20070405210308.GE17587@svana.org
Whole thread Raw
In response to Re: Auto Partitioning  (Markus Schiltknecht <markus@bluegap.ch>)
List pgsql-hackers
On Thu, Apr 05, 2007 at 10:00:37PM +0200, Markus Schiltknecht wrote:
> >If someone manages to crack uniqueness for GiST indexes, we'll have our
> >answer, since it has exactly the same problem but on a different scale.
> >(Or vice-versa, if some gets uniqueness for multiple indexes, we can do
> >it for GiST also).
>
> Uh.. can you elaborate on that? AFAICS, you would simply have to query
> multiple btree indexes and make sure non of them is violated. How would
> that help making unique GiST indexes possible? What's the problem there?

There's a race condition. What happens if someone else tries to insert
the same key at the same time. If you know it's going to be in the same
index you can lock the page. Across multiple indexes you run into
deadlock issues.

I'm not saying it's hard, just that it's not as easy as checking each
index...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Markus Schiltknecht
Date:
Subject: Re: Auto Partitioning
Next
From: "Larry Rosenman"
Date:
Subject: What X86/X64 OS's do we need coverage for?