Re: [HACKERS] has anybody else used r-tree indexes in 6.5?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Hoffmann <jeff(at)remapcorp(dot)com>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] has anybody else used r-tree indexes in 6.5?
Date: 1999-06-18 23:35:43
Message-ID: 9114.929748943@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Hoffmann <jeff(at)remapcorp(dot)com> writes:
> has something changed with r-tree indexes in 6.5?
> ERROR: Operator 500 must have a restriction selectivity estimator to be
> used in a btree index

What we have here is a big OOOPS.

The reference to "btree" is coming from btreesel, which it turns out is
called by rtreesel as well --- I missed that the first time around.
But that's just a cosmetic problem in the error message. The real
problem is that none of the operators that are used for rtree indexes
have restriction selectivity estimators.

They *used* to have selectivity estimators in 6.4.2 --- they all pointed
at intltsel, which is pretty much completely inappropriate for an area-
based comparison. I believe I must have removed those links from the
pg_operator table during one of my cleanup-and-make-consistent passes.

The right fix would be to put in an appropriate selectivity estimator,
but we can't do that as a 6.5.* patch because changing pg_operator
requires an initdb. It will have to wait for 6.6. (One of my to-do
items for 6.6 was to rewrite the selectivity estimators anyway, so I'll
see what I can do.) In the meantime, I think the only possible patch is
to disable the error check in btreesel and have it return a default
selectivity estimate instead of complaining. Drat.

Apparently, none of the regression tests exercise rtree indexes at all,
else we'd have known there was a problem. Adding an rtree regression test
seems to be strongly indicated as well...

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-06-19 00:16:15 Re: [HACKERS] has anybody else used r-tree indexes in 6.5?
Previous Message adrian 1999-06-18 23:09:19 Where in the world is pgsql-announce@postgresql.org??