On 2014-03-12 20:54:36 -0400, Tom Lane wrote:
> Robert Haas <robertmh...@gmail.com> writes:
> > On Wed, Mar 12, 2014 at 9:19 AM, Andres Freund <and...@2ndquadrant.com> 
> > wrote:
> >> Except that we don't have the infrastructure to perform such checks
> >> (neither partial, nor expression indexes, no exclusion constraints) on
> >> system tables atm. So it's not a entirely trivial thing to do.
> 
> > I'm probably woefully underinformed here, but it seems like getting
> > exclusion constraints working might be simpler than partial indexes or
> > expression indexes, because both of those involve being able to
> > evaluate arbitrary predicates, whereas exclusion constraints just
> > involve invoking index access methods to look for conflicting rows via
> > smarts built into your index AM.  The latter seems to involve less
> > risk of circularity (but I might be wrong).

Exclusion constraints support being partial... But I guess we could
forbid using that.

> You might be right.  I don't think anyone's ever looked at what it
> would take to support that particular case.  We have looked at the
> other cases and run away screaming ... but I think that was before
> exclusion constraints existed.

Hm. Is it actually that complicated to support checking predicates and
computing expressions for system catalogs during index insertions? If
we'd only create those indexes once the the basic bootstrap is over, I
don't see too much problems with circularity? Creating indexes on shared
catalogs after the immediate bootstrap isn't entirely trivial, but
should be doable.
I've searched for "running away screaming", but even with extending the
search critera a bit I unfortunately came up empty.

I don't really see much need for expression indexes on catalogs, but
partial unique constraints would surely be useful.

Now, what I *do* see problems with would be to try to evaluate
predicates/expressions when filling system caches. But it looks to be me
like the primary interest at least here is partial unique constraints?

Greetings,

Andres Freund

-- 
 Andres Freund                     http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to