Re: Auto Partitioning

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Markus Schiltknecht <markus(at)bluegap(dot)ch>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Gregory Stark <stark(at)enterprisedb(dot)com>, NikhilS <nikkhils(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Auto Partitioning
Date: 2007-04-05 21:03:08
Message-ID: 20070405210308.GE17587@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2007-04-05 21:56:41 Reviewers Guide to Deferred Transactions/Transaction Guarantee
Previous Message Alvaro Herrera 2007-04-05 20:57:58 Re: autovacuum multiworkers, patch 5

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2007-04-05 21:56:41 Reviewers Guide to Deferred Transactions/Transaction Guarantee
Previous Message Alvaro Herrera 2007-04-05 20:57:58 Re: autovacuum multiworkers, patch 5