pgsql: Fix bug introduced into indexable_outerrelids() by an

Started by Tom Lanealmost 21 years ago3 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

Log Message:
-----------
Fix bug introduced into indexable_outerrelids() by an ill-considered
"optimization". When we find a potentially useful joinclause, we
have to add all its other required_relids to the result, not only the
other clause_relids. They are different in the case of a joinclause
whose applicability has to be postponed due to outer join. We have
to include the extra rels because otherwise, after best_inner_indexscan
masks the join rels with index_outer_relids, it will always fail to
find the joinclause as applicable. Per report from Husam Tomeh.

Modified Files:
--------------
pgsql/src/backend/optimizer/path:
indxpath.c (r1.188 -> r1.189)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/indxpath.c.diff?r1=1.188&r2=1.189)

#2Michael Fuhr
mike@fuhr.org
In reply to: Tom Lane (#1)
Re: pgsql: Fix bug introduced into indexable_outerrelids() by an

On Thu, Sep 22, 2005 at 08:25:09PM -0300, Tom Lane wrote:

Fix bug introduced into indexable_outerrelids() by an ill-considered
"optimization".... Per report from Husam Tomeh.

Shouldn't that be "Per report from Jean-Pierre Pelletier"?

http://archives.postgresql.org/pgsql-performance/2005-09/msg00249.php

--
Michael Fuhr

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Michael Fuhr (#2)
Re: pgsql: Fix bug introduced into indexable_outerrelids() by an

Michael Fuhr <mike@fuhr.org> writes:

On Thu, Sep 22, 2005 at 08:25:09PM -0300, Tom Lane wrote:

Fix bug introduced into indexable_outerrelids() by an ill-considered
"optimization".... Per report from Husam Tomeh.

Shouldn't that be "Per report from Jean-Pierre Pelletier"?

Yup, you're right, I looked at the wrong messages in the thread while
composing the log entry. Oh well.

regards, tom lane