Re: WIP: Deferrable unique constraints

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)googlemail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: Deferrable unique constraints
Date: 2009-07-14 19:33:10
Message-ID: 20090714193310.GM4799@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis wrote:

> 1. Are you saying that an AM API change is the best route? If so, we
> should probably start a discussion along those lines. Heikki is already
> changing the API for index-only scans, and Dean's API change proposal
> may be useful for Kenneth's unique hash indexes. You might as well all
> attack the current API in unison ;)

Yeah, I don't think there's any point in keeping the API stable just for
the sake of keeping it stable. I mean surely we don't want to break it
for no reason, but if we can clean up the uniqueness check situation
somehow by breaking the API, for all means let's explore that ... (I
don't think anybody likes the way btree currently abuses the heap API;
it's just that it's so damn fast to do it that way. Certainly we don't
want to make it slower!)

> 2. Even if we allow some kind of bulk constraint check to optimize the
> "set a = a + 1" case, we should still allow some much cheaper mechanism
> to defer retail constraint violations. For that, why not make use of the
> existing constraint trigger mechanism?

Sure, perhaps you're right, which is why I added the disclaimer that I
hadn't actually read the patch in any detail ...

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-07-14 19:33:14 more than one index in a single heap pass?
Previous Message Dean Rasheed 2009-07-14 19:32:53 Re: WIP: Deferrable unique constraints