Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 094BCB5DBCA for ; Sun, 3 Jul 2011 02:41:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 42758-02 for ; Sun, 3 Jul 2011 05:40:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 9BCFCB5DBC1 for ; Sun, 3 Jul 2011 02:40:55 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p635eqkE018552; Sun, 3 Jul 2011 01:40:52 -0400 (EDT) To: Jon Nelson cc: pgsql-bugs@postgresql.org Subject: Re: view + explain + index scan -> bogus varno: 65001 (with some variations) In-reply-to: References: <4207.1309552056@sss.pgh.pa.us> Comments: In-reply-to Jon Nelson message dated "Sat, 02 Jul 2011 22:16:16 -0500" Date: Sun, 03 Jul 2011 01:40:51 -0400 Message-ID: <18551.1309671651@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201107/15 X-Sequence-Number: 30627 Jon Nelson writes: > On Fri, Jul 1, 2011 at 3:27 PM, Tom Lane wrote: >> FWIW, I can't reproduce such a failure with current 8.4 branch (nor any >> other). > Try adding: > set enable_mergejoin = false; Thanks, that did it. I've repaired the symptom exposed here: http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=d3d3ec0d890412f3b39a70e8fd08edf17e3c9f7c http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=789d3d4541e95c6079a55196bd63a6ab90e57c7c However, while I see how this could generate "bogus varno: 65001", I'm not entirely sure that the same issue explains your other report of "bogus varattno for OUTER var". If you can still reproduce that, please send a test case. regards, tom lane