Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TStdc-0008C8-6d for pgsql-bugs@postgresql.org; Mon, 29 Oct 2012 18:00:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TStdW-0006Nt-Oy for pgsql-bugs@postgresql.org; Mon, 29 Oct 2012 18:00:35 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id q9TI0SPE021287; Mon, 29 Oct 2012 14:00:29 -0400 (EDT) From: Tom Lane To: brian@omniti.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7626: Query planner never returns, uses 100% CPU In-reply-to: References: Comments: In-reply-to brian@omniti.com message dated "Mon, 29 Oct 2012 16:29:07 -0000" Date: Mon, 29 Oct 2012 14:00:28 -0400 Message-ID: <21286.1351533628@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) X-Archive-Number: 201210/235 X-Sequence-Number: 34535 brian@omniti.com writes: > Running this causes the thread to use 100% CPU and never returns (or at > least not for longer than my patience runs out). > This returns just fine on 8.4.1 and on 9.2beta. Hmm ... seems to be a consequence of commit 3b8968f25232ad09001bf35ab4cc59f5a501193e. I wrote in that patch + * This looks expensive, but in practical cases there won't be very many + * distinct sets of outer rels to consider. but evidently that was too optimistic :-(. Will need to think about suitable heuristics for limiting the sets of outer relations we consider building parameterized paths with. regards, tom lane