Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOVNQ-0004rS-Pc for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Jul 2016 19:35:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bOVNQ-0000hY-Bs for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Jul 2016 19:35:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bOVNP-0000gr-BU for pgsql-bugs@postgresql.org; Sat, 16 Jul 2016 19:35:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bOVNG-0005gi-Vg for pgsql-bugs@postgresql.org; Sat, 16 Jul 2016 19:35:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6GJZaLC021696; Sat, 16 Jul 2016 15:35:36 -0400 From: Tom Lane To: Peter Geoghegan cc: Daniel Newman , danielnewman@umich.edu, Robert Haas , pgsql-bugs Subject: Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column In-reply-to: References: <20160623162507.17237.39471@wrigleys.postgresql.org> <30648.1466701447@sss.pgh.pa.us> <10331.1466723337@sss.pgh.pa.us> <1009.1466803245@sss.pgh.pa.us> <2502.1466805945@sss.pgh.pa.us> <32645.1466868739@sss.pgh.pa.us> <19501.1466881277@sss.pgh.pa.us> <32702.1467039279@sss.pgh.pa.us> <1681.1467040869@sss.pgh.pa.us> <5399.1467058945@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Fri, 15 Jul 2016 19:21:06 -0700" Date: Sat, 16 Jul 2016 15:35:36 -0400 Message-ID: <21695.1468697736@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Peter Geoghegan 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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs