Lists: | pgsql-committers |
---|
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix another join removal bug: the check on PlaceHolderVars was w |
Date: | 2010-09-25 23:04:28 |
Message-ID: | E1OzdnA-0004nC-N9@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
Fix another join removal bug: the check on PlaceHolderVars was wrong.
The previous coding would decide that join removal was unsafe upon finding
a PlaceHolderVar that needed to be evaluated at the inner rel and then used
above the join. However, this fails to cover the case of PlaceHolderVars
that refer to both the inner rel and some other rels. Per bug report from
Andrus.
Branch
------
REL9_0_STABLE
Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=7fc8db849106db91e1053ed25045eb4fa877f212
Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c | 18 +++++++++++++-----
src/test/regress/expected/join.out | 21 +++++++++++++++++++++
src/test/regress/sql/join.sql | 15 +++++++++++++++
3 files changed, 49 insertions(+), 5 deletions(-)
From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Fix another join removal bug: the check on PlaceHolderVars was w |
Date: | 2010-09-26 00:29:16 |
Message-ID: | 20100926002916.GA22240@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
On Sat, Sep 25, 2010 at 11:04:28PM +0000, Tom Lane wrote:
> Fix another join removal bug: the check on PlaceHolderVars was
> wrong.
>
> The previous coding would decide that join removal was unsafe upon
> finding a PlaceHolderVar that needed to be evaluated at the inner
> rel and then used above the join. However, this fails to cover the
> case of PlaceHolderVars that refer to both the inner rel and some
> other rels. Per bug report from Andrus.
The person who found it originally was Kirill (xitology) Simonov. He
brought it up in IRC. :)
Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | David Fetter <david(at)fetter(dot)org> |
Cc: | pgsql-committers(at)postgresql(dot)org |
Subject: | Re: pgsql: Fix another join removal bug: the check on PlaceHolderVars was w |
Date: | 2010-09-26 00:52:39 |
Message-ID: | 17499.1285462359@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
David Fetter <david(at)fetter(dot)org> writes:
> On Sat, Sep 25, 2010 at 11:04:28PM +0000, Tom Lane wrote:
>> The previous coding would decide that join removal was unsafe upon
>> finding a PlaceHolderVar that needed to be evaluated at the inner
>> rel and then used above the join. However, this fails to cover the
>> case of PlaceHolderVars that refer to both the inner rel and some
>> other rels. Per bug report from Andrus.
> The person who found it originally was Kirill (xitology) Simonov. He
> brought it up in IRC. :)
[ shrug ... ] I can only go by what I see in the bug report.
regards, tom lane
From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Cc: | David Fetter <david(at)fetter(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: pgsql: Fix another join removal bug: the check on PlaceHolderVars was w |
Date: | 2010-09-26 10:36:47 |
Message-ID: | 201009261236.48805.andres@anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-committers |
On Sunday 26 September 2010 02:29:16 David Fetter wrote:
> On Sat, Sep 25, 2010 at 11:04:28PM +0000, Tom Lane wrote:
> > Fix another join removal bug: the check on PlaceHolderVars was
> > wrong.
> >
> > The previous coding would decide that join removal was unsafe upon
> > finding a PlaceHolderVar that needed to be evaluated at the inner
> > rel and then used above the join. However, this fails to cover the
> > case of PlaceHolderVars that refer to both the inner rel and some
> > other rels. Per bug report from Andrus.
>
> The person who found it originally was Kirill (xitology) Simonov. He
> brought it up in IRC. :)
No, thats a different bug... For one its affecting 8.4 at least as well, for
another its not yet fixed ;-)
Andres