Re: [v9.2] Fix Leaky View Problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [v9.2] Fix Leaky View Problem
Date
Msg-id 2199.1318993684@sss.pgh.pa.us
Whole thread Raw
In response to Re: [v9.2] Fix Leaky View Problem  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [v9.2] Fix Leaky View Problem  (Kohei KaiGai <kaigai@kaigai.gr.jp>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sun, Oct 16, 2011 at 4:46 AM, Kohei KaiGai <kaigai@kaigai.gr.jp> wrote:
>> I tried to reproduce the scenario with enough small from/join_collapse_limit
>> (typically 1), but it allows to push down qualifiers into the least scan plan.

> Hmm, you're right.  LIMIT 1000000000 prevents qual pushdown, but
> hitting from_collapse_limit/join_collapse_limit apparently doesn't.  I
> could have sworn I've seen this work the other way, but I guess not.

No, the collapse_limit variables are entirely unrelated to subquery
flattening, or to qual pushdown for that matter.  They only restrict the
number of join paths we consider.  And we will attempt to push down
quals into an unflattened subquery, too, if it looks safe.  See
subquery_is_pushdown_safe, qual_is_pushdown_safe, etc in allpaths.c.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jun Ishiduka
Date:
Subject: Re: Online base backup from the hot-standby
Next
From: Tom Lane
Date:
Subject: Re: termination of backend waiting for sync rep generates a junk log message