pgsql: Fix a bug in 8.2.x that was exposed while investigating Kevin - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix a bug in 8.2.x that was exposed while investigating Kevin
Date
Msg-id 20080109205012.2B1F5754108@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix a bug in 8.2.x that was exposed while investigating Kevin Grittner's
report of poor planning in 8.3: it's unsafe to push a constant across an
outer join when the outer-join condition is delayed by lower outer joins,
unless we recheck the outer-join condition at the upper outer join.
8.2.x doesn't really have the ability to tell whether this is the case
or not, but fortunately it doesn't matter --- it seems most desirable to
keep the join condition whether it's entirely redundant or not.  However,
it's usually mostly redundant, so force its selectivity to 1.0.

It might be a good idea to back-patch this into 8.1 as well, but I'll
refrain until/unless there's evidence that 8.1 actually fails on any
cases that this would fix.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/backend/optimizer/path:
        pathkeys.c (r1.79 -> r1.79.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/pathkeys.c?r1=1.79&r2=1.79.2.1)
    pgsql/src/test/regress/expected:
        join.out (r1.28.2.4 -> r1.28.2.5)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/join.out?r1=1.28.2.4&r2=1.28.2.5)
        join_1.out (r1.10.2.4 -> r1.10.2.5)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/join_1.out?r1=1.10.2.4&r2=1.10.2.5)
    pgsql/src/test/regress/sql:
        join.sql (r1.19.2.4 -> r1.19.2.5)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/join.sql?r1=1.19.2.4&r2=1.19.2.5)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix some planner issues found while investigating Kevin
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix CREATE INDEX CONCURRENTLY to not deadlock against an