Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Daniel Newman <dtnewman(at)gmail(dot)com>, danielnewman(at)umich(dot)edu, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
Date: 2016-07-16 20:32:30
Message-ID: 25690.1468701150@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Peter Geoghegan <pg(at)heroku(dot)com> writes:
> On Sat, Jul 16, 2016 at 1:04 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> ... Maybe we should stick at least one simple test query in there
>> before we drop the index again.

> That's what I was thinking, but wasn't sure offhand which way it would
> happen. Couldn't hurt much to just add one more test.

Right. Done.

> It is pretty awkward how the hash index searches are in
> hash_index.sql, which must coordinate with create_index.sql, but I
> didn't want to go against the grain and just put it all in one place.
> Maybe I should have.

Well, that structure is intended to work with indexes that are built and
then left in place throughout the tests. For a short-lived index, the
best thing is to create it, test it, drop it, and really you can do that
about anywhere. But again, doing that on tenk1 is problematic because
of its popularity in all sorts of query-planning tests; if you're going
to add a short-lived index you need to do that in a test that's not meant
to run concurrently with a lot of other stuff.

Another approach we could have taken is to construct a table just for
this purpose. But I think the way it is now is fine.

In the longer term, if hash indexes ever become less of a second-class
citizen, maybe we'd actually want to include a hash index on tenk1
throughout the tests. But I don't want to go there today.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2016-07-16 20:56:08 Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
Previous Message Peter Geoghegan 2016-07-16 20:10:15 Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column