From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Further mucking with PlaceHolderVar-related restrictions on join |
Date: | 2015-08-10 21:18:38 |
Message-ID: | E1ZOuSs-0002ij-N4@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Further mucking with PlaceHolderVar-related restrictions on join order.
Commit 85e5e222b1dd02f135a8c3bf387d0d6d88e669bd turns out not to have taken
care of all cases of the partially-evaluatable-PlaceHolderVar problem found
by Andreas Seltenreich's fuzz testing. I had set it up to check for risky
PHVs only in the event that we were making a star-schema-based exception to
the param_source_rels join ordering heuristic. However, it turns out that
the problem can occur even in joins that satisfy the param_source_rels
heuristic, in which case allow_star_schema_join() isn't consulted.
Refactor so that we check for risky PHVs whenever the proposed join has
any remaining parameterization.
Back-patch to 9.2, like the previous patch (except for the regression test
case, which only works back to 9.3 because it uses LATERAL).
Note that this discovery implies that problems of this sort could've
occurred in 9.2 and up even before the star-schema patch; though I've not
tried to prove that experimentally.
Branch
------
REL9_5_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/fda25b22018095fa86bee5a31920344976eb7479
Modified Files
--------------
src/backend/optimizer/path/joinpath.c | 69 ++++++++++++++++++++-------------
src/test/regress/expected/join.out | 20 ++++++++++
src/test/regress/sql/join.sql | 18 +++++++++
3 files changed, 79 insertions(+), 28 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-08-10 21:35:08 | pgsql: Accept alternate spellings of __sparcv7 and __sparcv8. |
Previous Message | Tom Lane | 2015-08-10 20:40:31 | Re: [COMMITTERS] pgsql: Fix pg_dump to dump shell types. |