Re: Review: B-Tree emulation for GIN - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Review: B-Tree emulation for GIN
Date
Msg-id 28428.1238107896@sss.pgh.pa.us
Whole thread Raw
In response to Re: Review: B-Tree emulation for GIN  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> Also, if extractQuery is non-strict, shouldn't we call it and see if it
> returns some useful keys?

Perhaps.  One risk factor for approaching it that way is that there are
probably a lot of opclasses out there that haven't bothered to mark
these functions strict, since it's never mattered before.  (A handy
example is that the brand new btree_gin opclasses did not bother, as
submitted; though in a fit of paranoia I made them do so before
committing.)  If the extractQuery function isn't actually guarding
against this, you'll get a crash.

That's not a showstopper reason not to change, of course, but it does
mean that I'd like to see an actual use case for a non-strict GIN index
operator before taking any risk.  Note that IS NULL isn't an operator,
so even if we were to try to support it in GIN, that would be a
different code path (just as it is in btree).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: "maxretries" option of pg_standby doesn't work as expected
Next
From: Tom Lane
Date:
Subject: Re: maintenance_work_mem and autovacuum