Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHd3C-0004iy-9w for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Jun 2016 20:22:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bHd3B-0000m6-EW for pgsql-bugs@arkaria.postgresql.org; Mon, 27 Jun 2016 20:22:33 +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 1bHd3A-0000lR-Dn for pgsql-bugs@postgresql.org; Mon, 27 Jun 2016 20:22:32 +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 1bHd37-00085g-C3 for pgsql-bugs@postgresql.org; Mon, 27 Jun 2016 20:22:31 +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 u5RKMPGM005400; Mon, 27 Jun 2016 16:22:25 -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> Comments: In-reply-to Peter Geoghegan message dated "Mon, 27 Jun 2016 11:18:52 -0700" Date: Mon, 27 Jun 2016 16:22:25 -0400 Message-ID: <5399.1467058945@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: > I like this idea. Should I write a patch? BTW, while you're at it: it strikes me that the threshold should be either min(NBuffers, maintenance_work_mem) or min(NLocBuffer, maintenance_work_mem), depending on whether we're talking about a regular or temp table/index. That is, there's a pre-existing bug here that when NLocBuffer is a good deal less than NBuffers (which is the typical case nowadays) you'll get a lot of thrashing between local buffers and kernel cache, if the index isn't quite big enough to trigger the sorting code. This might not manifest as actual I/O, but it's not the intended behavior either. 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