Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TNlT2-0001lA-UO for pgsql-admin@postgresql.org; Mon, 15 Oct 2012 14:16:28 +0000 Received: from mail.dhs-club.com ([208.69.229.2]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TNlSw-00036V-F4 for pgsql-admin@postgresql.org; Mon, 15 Oct 2012 14:16:28 +0000 Received: from [192.168.2.108] (c-68-56-241-190.hsd1.fl.comcast.net [68.56.241.190]) (authenticated bits=0) by mail.dhs-club.com (8.14.4/8.14.4) with ESMTP id q9FEGJPu010869 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Mon, 15 Oct 2012 14:16:20 GMT Message-ID: <507C1AAF.20008@dhs-club.com> Date: Mon, 15 Oct 2012 10:16:15 -0400 From: Bill MacArthur User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: Tom Lane CC: pgsql-admin@postgresql.org Subject: Re: query from 9.0 fails to return on 9.2 References: <50786A75.5000601@dhs-club.com> <21576.1350073671@sss.pgh.pa.us> In-Reply-To: <21576.1350073671@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.70 on 208.69.229.2 X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201210/49 X-Sequence-Number: 40165 On 10/12/2012 4:27 PM, Tom Lane wrote: > Bill MacArthur writes: >> Here is the top line of the *really long* explain as run on a 9.0 server (it takes only a couple of seconds to return): HashAggregate (cost=1148.97..1149.36 rows=1 width=205) >> However, the same query run on the same machine after upgrade to 9.2.1 never returns. The query was sitting there for 10 hours unbeknownst to me. > > I'm wondering what values of join_collapse_limit & from_collapse_limit > you're using on each machine. > > If it's not an oops-forgot-to-copy-the-configuration problem, you're > going to need to put together a self-contained test case. > > regards, tom lane > Thanks for the feedback, Tom. Those two settings remained at the defaults of 8 for both in both versions. I did a quick google on the latter setting and found an ongoing discussion from back in 2011 involving increasing the default, but your concern was that planner memory usage would escalate considerably by doing so. Given that information, I am inclined to ruminate on the query and boil it down to something simpler (less joins). Unless you think there is value to the greater good in determining what the underlying issue is, I won't bother creating a test case... at least not until I spend some time trying to rework the thing.