pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@heroku.com>
Cc: Daniel Newman <dtnewman@gmail.com>
Cc: danielnewman@umich.edu, Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
Date: Mon, 27 Jun 2016 11:21:09 -0400
Message-ID: <1681.1467040869@sss.pgh.pa.us> (raw)
In-Reply-To: <32702.1467039279@sss.pgh.pa.us>
References: <20160623162507.17237.39471@wrigleys.postgresql.org>
	<30648.1466701447@sss.pgh.pa.us>
	<CALo0FatmGhupZU02+2WwN3v=rDoPuEkY_HhMQRhmfdQxerXA8Q@mail.gmail.com>
	<10331.1466723337@sss.pgh.pa.us>
	<CAM3SWZRZ=vCyO+41Nrjv5Mr1NE=W-MtVj5F=Lp88M8rqHBOFGQ@mail.gmail.com>
	<1009.1466803245@sss.pgh.pa.us>
	<CAM3SWZTyfbs2YQ0OMWMW0MZMfSKAkPKtusdhTKS+3FLdL9kEww@mail.gmail.com>
	<2502.1466805945@sss.pgh.pa.us>
	<CAM3SWZQqU8awdp6Q2_MHwCZC15qau23FTp19qka4NG+6U+fqjA@mail.gmail.com>
	<32645.1466868739@sss.pgh.pa.us>
	<CAM3SWZRCjnttFcXUeN0fuWSd3dXPmP7B4i_pu8C9kQs8ZUoThg@mail.gmail.com>
	<19501.1466881277@sss.pgh.pa.us>
	<CAM3SWZT7YYjf=SR-Vc6GCe6g1zHrUjKaA=5UwLymO3goWxPR+w@mail.gmail.com>
	<32702.1467039279@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

I wrote:
> But exercising a non-default code path in hash index build is something we
> only need in one place in the tests, and at least in my judgment there is
> a possibility for platform-specific behavior.  So I think some way of
> turning it on dynamically, and then adding that as a standard test case,
> would be a considerable improvement.  I just don't quite want to go to the
> effort of inventing a GUC or reloption.  Is there some intermediate
> answer?

A small-footprint answer that just occurred to me is to redefine the
threshold as being, not NBuffers, but maintenance_work_mem.  Then a
reasonably-sized test case could be made by reducing that to its minimum
allowed value.  This seems like it'd be fairly unsurprising for users
since there's lots of precedent for maintenance_work_mem affecting the
behavior of CREATE INDEX.

If maintenance_work_mem exceeds shared_buffers then you'd get a certain
amount of thrashing between shared buffers and kernel disk cache, but it
wouldn't be really awful unless maintenance_work_mem exceeded available
RAM, which would be a certifiably Bad Idea anyway.  I guess we could
forestall the buffer-thrashing scenario and preserve testability by
setting the sort threshold to min(NBuffers, maintenance_work_mem).

			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



view thread (32+ messages)  latest in thread

Message-ID: <1681.1467040869@sss.pgh.pa.us>
Permalink:  ../1681.1467040869@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1681.1467040869@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pg@heroku.com, dtnewman@gmail.com, robertmhaas@gmail.com
  Subject: Re: BUG #14210: filter by "=" constraint doesn't work when hash index is present on a column
  In-Reply-To: <1681.1467040869@sss.pgh.pa.us>
  References: <20160623162507.17237.39471@wrigleys.postgresql.org> <30648.1466701447@sss.pgh.pa.us> <CALo0FatmGhupZU02+2WwN3v=rDoPuEkY_HhMQRhmfdQxerXA8Q@mail.gmail.com> <10331.1466723337@sss.pgh.pa.us> <CAM3SWZRZ=vCyO+41Nrjv5Mr1NE=W-MtVj5F=Lp88M8rqHBOFGQ@mail.gmail.com> <1009.1466803245@sss.pgh.pa.us> <CAM3SWZTyfbs2YQ0OMWMW0MZMfSKAkPKtusdhTKS+3FLdL9kEww@mail.gmail.com> <2502.1466805945@sss.pgh.pa.us> <CAM3SWZQqU8awdp6Q2_MHwCZC15qau23FTp19qka4NG+6U+fqjA@mail.gmail.com> <32645.1466868739@sss.pgh.pa.us> <CAM3SWZRCjnttFcXUeN0fuWSd3dXPmP7B4i_pu8C9kQs8ZUoThg@mail.gmail.com> <19501.1466881277@sss.pgh.pa.us> <CAM3SWZT7YYjf=SR-Vc6GCe6g1zHrUjKaA=5UwLymO3goWxPR+w@mail.gmail.com> <32702.1467039279@sss.pgh.pa.us> <1681.1467040869@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox