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 19:35:36
Message-ID: 21695.1468697736@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:
> Finally found time for this. Attached patch tests hash tuplesorts
> along the lines we discussed. It adds one new tuplesort operation,
> which does not spill to disk. It also asserts that hash values
> retrieved through the tuplesort interface are in fact in sorted order.
> I wanted to have something reliably trip when comparetup_index_hash()
> gives wrong answers, even when a corrupt final index is perhaps not a
> consequence of the underlying bug.

Pushed with some adjustments, mostly paranoia concerning integer overflows
in the calculation around maintenance_work_mem. I did not like the way
you'd set up the test case though: tenk1 is *very* heavily used in the
regression tests, and having an extra index on it that might capture query
plans for unrelated test cases doesn't seem like a good idea. Especially
not when you drop the index in the middle of a large group of parallel
tests, so that any capturing that did happen would be timing-sensitive.
So I just made the create_index test create and immediately drop the
index. We have other tests that are supposed to exercise searches of
hash indexes, anyway.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2016-07-16 19:52:57 Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
Previous Message Amit Kapila 2016-07-16 12:55:08 Re: Invalid indexes should not consume update overhead