pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Further fixes for degenerate outer join clauses.
17+ messages / 4 participants
[nested] [flat]
* pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-06 19:36 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 17+ messages in thread
From: Tom Lane @ 2015-08-06 19:36 UTC (permalink / raw)
To: pgsql-committers
Further fixes for degenerate outer join clauses.
Further testing revealed that commit f69b4b9495269cc4 was still a few
bricks shy of a load: minor tweaking of the previous test cases resulted
in the same wrong-outer-join-order problem coming back. After study
I concluded that my previous changes in make_outerjoininfo() were just
accidentally masking the problem, and should be reverted in favor of
forcing syntactic join order whenever an upper outer join's predicate
doesn't mention a lower outer join's LHS. This still allows the
chained-outer-joins style that is the normally optimizable case.
I also tightened things up some more in join_is_legal(). It seems to me
on review that what's really happening in the exception case where we
ignore a mismatched special join is that we're allowing the proposed join
to associate into the RHS of the outer join we're comparing it to. As
such, we should *always* insist that the proposed join be a left join,
which eliminates a bunch of rather dubious argumentation. The case where
we weren't enforcing that was the one that was already known buggy anyway
(it had a violatable Assert before the aforesaid commit) so it hardly
deserves a lot of deference.
Back-patch to all active branches, like the previous patch. The added
regression test case failed in all branches back to 9.1, and I think it's
only an unrelated change in costing calculations that kept 9.0 from
choosing a broken plan.
Branch
------
REL9_5_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/df3b0f47b9766ff14f50c3e381d8c00a9c2b7a4f
Modified Files
--------------
src/backend/optimizer/README | 23 +++++++---
src/backend/optimizer/path/joinrels.c | 73 ++++++++++++--------------------
src/backend/optimizer/plan/initsplan.c | 28 ++++++------
src/test/regress/expected/join.out | 72 ++++++++++++++++++++++++++++++-
src/test/regress/sql/join.sql | 25 +++++++++++
5 files changed, 153 insertions(+), 68 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 17+ messages in thread
* pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-06 19:36 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 17+ messages in thread
From: Tom Lane @ 2015-08-06 19:36 UTC (permalink / raw)
To: pgsql-committers
Further fixes for degenerate outer join clauses.
Further testing revealed that commit f69b4b9495269cc4 was still a few
bricks shy of a load: minor tweaking of the previous test cases resulted
in the same wrong-outer-join-order problem coming back. After study
I concluded that my previous changes in make_outerjoininfo() were just
accidentally masking the problem, and should be reverted in favor of
forcing syntactic join order whenever an upper outer join's predicate
doesn't mention a lower outer join's LHS. This still allows the
chained-outer-joins style that is the normally optimizable case.
I also tightened things up some more in join_is_legal(). It seems to me
on review that what's really happening in the exception case where we
ignore a mismatched special join is that we're allowing the proposed join
to associate into the RHS of the outer join we're comparing it to. As
such, we should *always* insist that the proposed join be a left join,
which eliminates a bunch of rather dubious argumentation. The case where
we weren't enforcing that was the one that was already known buggy anyway
(it had a violatable Assert before the aforesaid commit) so it hardly
deserves a lot of deference.
Back-patch to all active branches, like the previous patch. The added
regression test case failed in all branches back to 9.1, and I think it's
only an unrelated change in costing calculations that kept 9.0 from
choosing a broken plan.
Branch
------
REL9_2_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/754ece936ca0938dcb149f7617df14b202034e28
Modified Files
--------------
src/backend/optimizer/README | 23 +++++++---
src/backend/optimizer/path/joinrels.c | 73 ++++++++++++--------------------
src/backend/optimizer/plan/initsplan.c | 28 ++++++------
src/test/regress/expected/join.out | 72 ++++++++++++++++++++++++++++++-
src/test/regress/sql/join.sql | 25 +++++++++++
5 files changed, 153 insertions(+), 68 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 17+ messages in thread
* pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-06 19:36 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 17+ messages in thread
From: Tom Lane @ 2015-08-06 19:36 UTC (permalink / raw)
To: pgsql-committers
Further fixes for degenerate outer join clauses.
Further testing revealed that commit f69b4b9495269cc4 was still a few
bricks shy of a load: minor tweaking of the previous test cases resulted
in the same wrong-outer-join-order problem coming back. After study
I concluded that my previous changes in make_outerjoininfo() were just
accidentally masking the problem, and should be reverted in favor of
forcing syntactic join order whenever an upper outer join's predicate
doesn't mention a lower outer join's LHS. This still allows the
chained-outer-joins style that is the normally optimizable case.
I also tightened things up some more in join_is_legal(). It seems to me
on review that what's really happening in the exception case where we
ignore a mismatched special join is that we're allowing the proposed join
to associate into the RHS of the outer join we're comparing it to. As
such, we should *always* insist that the proposed join be a left join,
which eliminates a bunch of rather dubious argumentation. The case where
we weren't enforcing that was the one that was already known buggy anyway
(it had a violatable Assert before the aforesaid commit) so it hardly
deserves a lot of deference.
Back-patch to all active branches, like the previous patch. The added
regression test case failed in all branches back to 9.1, and I think it's
only an unrelated change in costing calculations that kept 9.0 from
choosing a broken plan.
Branch
------
REL9_3_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/3e79144a848e9e65d248d252488a37678407d6b3
Modified Files
--------------
src/backend/optimizer/README | 23 +++++++---
src/backend/optimizer/path/joinrels.c | 73 ++++++++++++--------------------
src/backend/optimizer/plan/initsplan.c | 28 ++++++------
src/test/regress/expected/join.out | 72 ++++++++++++++++++++++++++++++-
src/test/regress/sql/join.sql | 25 +++++++++++
5 files changed, 153 insertions(+), 68 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 17+ messages in thread
* pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-06 19:36 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 17+ messages in thread
From: Tom Lane @ 2015-08-06 19:36 UTC (permalink / raw)
To: pgsql-committers
Further fixes for degenerate outer join clauses.
Further testing revealed that commit f69b4b9495269cc4 was still a few
bricks shy of a load: minor tweaking of the previous test cases resulted
in the same wrong-outer-join-order problem coming back. After study
I concluded that my previous changes in make_outerjoininfo() were just
accidentally masking the problem, and should be reverted in favor of
forcing syntactic join order whenever an upper outer join's predicate
doesn't mention a lower outer join's LHS. This still allows the
chained-outer-joins style that is the normally optimizable case.
I also tightened things up some more in join_is_legal(). It seems to me
on review that what's really happening in the exception case where we
ignore a mismatched special join is that we're allowing the proposed join
to associate into the RHS of the outer join we're comparing it to. As
such, we should *always* insist that the proposed join be a left join,
which eliminates a bunch of rather dubious argumentation. The case where
we weren't enforcing that was the one that was already known buggy anyway
(it had a violatable Assert before the aforesaid commit) so it hardly
deserves a lot of deference.
Back-patch to all active branches, like the previous patch. The added
regression test case failed in all branches back to 9.1, and I think it's
only an unrelated change in costing calculations that kept 9.0 from
choosing a broken plan.
Branch
------
REL9_4_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/7ef507ad77343f87acb324e32212c44eabd0db7b
Modified Files
--------------
src/backend/optimizer/README | 23 +++++++---
src/backend/optimizer/path/joinrels.c | 73 ++++++++++++--------------------
src/backend/optimizer/plan/initsplan.c | 28 ++++++------
src/test/regress/expected/join.out | 72 ++++++++++++++++++++++++++++++-
src/test/regress/sql/join.sql | 25 +++++++++++
5 files changed, 153 insertions(+), 68 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 17+ messages in thread
* pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-06 19:36 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 17+ messages in thread
From: Tom Lane @ 2015-08-06 19:36 UTC (permalink / raw)
To: pgsql-committers
Further fixes for degenerate outer join clauses.
Further testing revealed that commit f69b4b9495269cc4 was still a few
bricks shy of a load: minor tweaking of the previous test cases resulted
in the same wrong-outer-join-order problem coming back. After study
I concluded that my previous changes in make_outerjoininfo() were just
accidentally masking the problem, and should be reverted in favor of
forcing syntactic join order whenever an upper outer join's predicate
doesn't mention a lower outer join's LHS. This still allows the
chained-outer-joins style that is the normally optimizable case.
I also tightened things up some more in join_is_legal(). It seems to me
on review that what's really happening in the exception case where we
ignore a mismatched special join is that we're allowing the proposed join
to associate into the RHS of the outer join we're comparing it to. As
such, we should *always* insist that the proposed join be a left join,
which eliminates a bunch of rather dubious argumentation. The case where
we weren't enforcing that was the one that was already known buggy anyway
(it had a violatable Assert before the aforesaid commit) so it hardly
deserves a lot of deference.
Back-patch to all active branches, like the previous patch. The added
regression test case failed in all branches back to 9.1, and I think it's
only an unrelated change in costing calculations that kept 9.0 from
choosing a broken plan.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/8703059c6b55c427100e00a09f66534b6ccbfaa1
Modified Files
--------------
src/backend/optimizer/README | 23 +++++++---
src/backend/optimizer/path/joinrels.c | 73 ++++++++++++--------------------
src/backend/optimizer/plan/initsplan.c | 28 ++++++------
src/test/regress/expected/join.out | 72 ++++++++++++++++++++++++++++++-
src/test/regress/sql/join.sql | 25 +++++++++++
5 files changed, 153 insertions(+), 68 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 17+ messages in thread
* pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-06 19:36 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 17+ messages in thread
From: Tom Lane @ 2015-08-06 19:36 UTC (permalink / raw)
To: pgsql-committers
Further fixes for degenerate outer join clauses.
Further testing revealed that commit f69b4b9495269cc4 was still a few
bricks shy of a load: minor tweaking of the previous test cases resulted
in the same wrong-outer-join-order problem coming back. After study
I concluded that my previous changes in make_outerjoininfo() were just
accidentally masking the problem, and should be reverted in favor of
forcing syntactic join order whenever an upper outer join's predicate
doesn't mention a lower outer join's LHS. This still allows the
chained-outer-joins style that is the normally optimizable case.
I also tightened things up some more in join_is_legal(). It seems to me
on review that what's really happening in the exception case where we
ignore a mismatched special join is that we're allowing the proposed join
to associate into the RHS of the outer join we're comparing it to. As
such, we should *always* insist that the proposed join be a left join,
which eliminates a bunch of rather dubious argumentation. The case where
we weren't enforcing that was the one that was already known buggy anyway
(it had a violatable Assert before the aforesaid commit) so it hardly
deserves a lot of deference.
Back-patch to all active branches, like the previous patch. The added
regression test case failed in all branches back to 9.1, and I think it's
only an unrelated change in costing calculations that kept 9.0 from
choosing a broken plan.
Branch
------
REL9_0_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/d860ba43ffe08c53d9e096fd21eb500b69126d70
Modified Files
--------------
src/backend/optimizer/README | 23 +++++++---
src/backend/optimizer/path/joinrels.c | 73 ++++++++++++--------------------
src/backend/optimizer/plan/initsplan.c | 28 ++++++------
src/test/regress/expected/join.out | 72 ++++++++++++++++++++++++++++++-
src/test/regress/sql/join.sql | 25 +++++++++++
5 files changed, 153 insertions(+), 68 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 17+ messages in thread
* pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-06 19:36 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 17+ messages in thread
From: Tom Lane @ 2015-08-06 19:36 UTC (permalink / raw)
To: pgsql-committers
Further fixes for degenerate outer join clauses.
Further testing revealed that commit f69b4b9495269cc4 was still a few
bricks shy of a load: minor tweaking of the previous test cases resulted
in the same wrong-outer-join-order problem coming back. After study
I concluded that my previous changes in make_outerjoininfo() were just
accidentally masking the problem, and should be reverted in favor of
forcing syntactic join order whenever an upper outer join's predicate
doesn't mention a lower outer join's LHS. This still allows the
chained-outer-joins style that is the normally optimizable case.
I also tightened things up some more in join_is_legal(). It seems to me
on review that what's really happening in the exception case where we
ignore a mismatched special join is that we're allowing the proposed join
to associate into the RHS of the outer join we're comparing it to. As
such, we should *always* insist that the proposed join be a left join,
which eliminates a bunch of rather dubious argumentation. The case where
we weren't enforcing that was the one that was already known buggy anyway
(it had a violatable Assert before the aforesaid commit) so it hardly
deserves a lot of deference.
Back-patch to all active branches, like the previous patch. The added
regression test case failed in all branches back to 9.1, and I think it's
only an unrelated change in costing calculations that kept 9.0 from
choosing a broken plan.
Branch
------
REL9_1_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/656b1e8cf358990b7700448d3b9e85202105cde0
Modified Files
--------------
src/backend/optimizer/README | 23 +++++++---
src/backend/optimizer/path/joinrels.c | 73 ++++++++++++--------------------
src/backend/optimizer/plan/initsplan.c | 28 ++++++------
src/test/regress/expected/join.out | 72 ++++++++++++++++++++++++++++++-
src/test/regress/sql/join.sql | 25 +++++++++++
5 files changed, 153 insertions(+), 68 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-12 19:18 Andrew Dunstan <andrew@dunslane.net>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 17+ messages in thread
From: Andrew Dunstan @ 2015-08-12 19:18 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers
On 08/06/2015 03:36 PM, Tom Lane wrote:
> Further fixes for degenerate outer join clauses.
>
> Further testing revealed that commit f69b4b9495269cc4 was still a few
> bricks shy of a load: minor tweaking of the previous test cases resulted
> in the same wrong-outer-join-order problem coming back. After study
> I concluded that my previous changes in make_outerjoininfo() were just
> accidentally masking the problem, and should be reverted in favor of
> forcing syntactic join order whenever an upper outer join's predicate
> doesn't mention a lower outer join's LHS. This still allows the
> chained-outer-joins style that is the normally optimizable case.
>
> I also tightened things up some more in join_is_legal(). It seems to me
> on review that what's really happening in the exception case where we
> ignore a mismatched special join is that we're allowing the proposed join
> to associate into the RHS of the outer join we're comparing it to. As
> such, we should *always* insist that the proposed join be a left join,
> which eliminates a bunch of rather dubious argumentation. The case where
> we weren't enforcing that was the one that was already known buggy anyway
> (it had a violatable Assert before the aforesaid commit) so it hardly
> deserves a lot of deference.
>
> Back-patch to all active branches, like the previous patch. The added
> regression test case failed in all branches back to 9.1, and I think it's
> only an unrelated change in costing calculations that kept 9.0 from
> choosing a broken plan.
Looks like this might have upset brolga on 9.0 and 9.1 - it's coming up
with a different plan from what's expected.
cheers
andrew
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-12 22:41 Tom Lane <tgl@sss.pgh.pa.us>
parent: Andrew Dunstan <andrew@dunslane.net>
1 sibling, 0 replies; 17+ messages in thread
From: Tom Lane @ 2015-08-12 22:41 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-committers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 08/06/2015 03:36 PM, Tom Lane wrote:
>> Further fixes for degenerate outer join clauses.
> Looks like this might have upset brolga on 9.0 and 9.1 - it's coming up
> with a different plan from what's expected.
Yeah, I saw that, but haven't had time yet to investigate what's up.
Odd that it's just the one critter though ...
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: [COMMITTERS] pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-13 02:35 Tom Lane <tgl@sss.pgh.pa.us>
parent: Andrew Dunstan <andrew@dunslane.net>
1 sibling, 1 reply; 17+ messages in thread
From: Tom Lane @ 2015-08-13 02:35 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-hackers@postgreSQL.org
Andrew Dunstan <andrew@dunslane.net> writes:
> On 08/06/2015 03:36 PM, Tom Lane wrote:
>> Further fixes for degenerate outer join clauses.
> Looks like this might have upset brolga on 9.0 and 9.1 - it's coming up
> with a different plan from what's expected.
I looked into this, and while I can't be certain of the diagnosis without
looking at the assembly code brolga generates (no, I don't want to), I'm
pretty sure I know what's going on here. The two plans in question have
exactly the same estimated costs on my machine, which results in add_path
discarding the second one to arrive. Evidently, on brolga the second path
gets some fractionally cheaper estimate due to some compiler-specific
variation in the way the arithmetic is done, so it gets kept rather than
the first one.
In 9.2 and up we got rid of that class of problems with this patch:
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL9_2_BR [33e99153e] 2012-04-21 00:51:14 -0400
Use fuzzy not exact cost comparison for the final tie-breaker in add_path.
Instead of an exact cost comparison, use a fuzzy comparison with 1e-10
delta after all other path metrics have proved equal. This is to avoid
having platform-specific roundoff behaviors determine the choice when
two paths are really the same to our cost estimators. Adjust the
recently-added test case that made it obvious we had a problem here.
but 9.0 and 9.1 still have platform-dependent treatment of paths with
essentially equal cost estimates.
I'm not entirely sure what to do about this. We could back-patch that
patch into 9.0 and 9.1, but it's conceivable somebody would squawk about
planner behavioral changes. The only other idea that seems practical is
to remove regression test cases that have platform-specific results in
those branches. Probably that wouldn't result in a real reduction in the
quality of the test coverage for those branches (we could still execute
the query, just not EXPLAIN it). But it seems like a pretty ad-hoc
answer, and the next case might be one that hurts more not to test.
Thoughts?
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: [COMMITTERS] pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-13 14:10 Stephen Frost <sfrost@snowman.net>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 17+ messages in thread
From: Stephen Frost @ 2015-08-13 14:10 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-hackers@postgreSQL.org
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> I'm not entirely sure what to do about this. We could back-patch that
> patch into 9.0 and 9.1, but it's conceivable somebody would squawk about
> planner behavioral changes. The only other idea that seems practical is
> to remove regression test cases that have platform-specific results in
> those branches. Probably that wouldn't result in a real reduction in the
> quality of the test coverage for those branches (we could still execute
> the query, just not EXPLAIN it). But it seems like a pretty ad-hoc
> answer, and the next case might be one that hurts more not to test.
>
> Thoughts?
Have an alternate file for those other cases, rather than remove the
test? The complaint was about one buildfarm member, so hopefully that's
practical and doesn't require a lot of different permutations.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: [COMMITTERS] pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-13 14:26 Tom Lane <tgl@sss.pgh.pa.us>
parent: Stephen Frost <sfrost@snowman.net>
0 siblings, 1 reply; 17+ messages in thread
From: Tom Lane @ 2015-08-13 14:26 UTC (permalink / raw)
To: Stephen Frost <sfrost@snowman.net>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-hackers@postgresql.org
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> I'm not entirely sure what to do about this. We could back-patch that
>> patch into 9.0 and 9.1, but it's conceivable somebody would squawk about
>> planner behavioral changes. The only other idea that seems practical is
>> to remove regression test cases that have platform-specific results in
>> those branches. Probably that wouldn't result in a real reduction in the
>> quality of the test coverage for those branches (we could still execute
>> the query, just not EXPLAIN it). But it seems like a pretty ad-hoc
>> answer, and the next case might be one that hurts more not to test.
>>
>> Thoughts?
> Have an alternate file for those other cases, rather than remove the
> test? The complaint was about one buildfarm member, so hopefully that's
> practical and doesn't require a lot of different permutations.
I considered that but don't find it practical or attractive, especially
not if the only way to keep such a file updated is to wait and see whether
the buildfarm complains.
On the whole I'm leaning towards back-patching 33e99153e. While the case
of exactly equal plan costs does come up in the regression tests (which
tend to inspect plans for queries on small simple tables), I think it's
relatively unlikely to happen with real-world data.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: [COMMITTERS] pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-13 14:38 Stephen Frost <sfrost@snowman.net>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 17+ messages in thread
From: Stephen Frost @ 2015-08-13 14:38 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-hackers@postgresql.org
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > * Tom Lane (tgl@sss.pgh.pa.us) wrote:
> >> I'm not entirely sure what to do about this. We could back-patch that
> >> patch into 9.0 and 9.1, but it's conceivable somebody would squawk about
> >> planner behavioral changes. The only other idea that seems practical is
> >> to remove regression test cases that have platform-specific results in
> >> those branches. Probably that wouldn't result in a real reduction in the
> >> quality of the test coverage for those branches (we could still execute
> >> the query, just not EXPLAIN it). But it seems like a pretty ad-hoc
> >> answer, and the next case might be one that hurts more not to test.
> >>
> >> Thoughts?
>
> > Have an alternate file for those other cases, rather than remove the
> > test? The complaint was about one buildfarm member, so hopefully that's
> > practical and doesn't require a lot of different permutations.
>
> I considered that but don't find it practical or attractive, especially
> not if the only way to keep such a file updated is to wait and see whether
> the buildfarm complains.
I agree, that's a bit unfortunate, but it strikes me as pretty unlikely
that we're ever going to change those tests or that a code change would
end up causing yet another different plan before 9.1 is completely out
of support in the next couple years.
> On the whole I'm leaning towards back-patching 33e99153e. While the case
> of exactly equal plan costs does come up in the regression tests (which
> tend to inspect plans for queries on small simple tables), I think it's
> relatively unlikely to happen with real-world data.
I agree it's unlikely, but I don't particularly like changing our mind
on a back-patching decision 3 years later to satisfy our regression
tests.
Still, I don't feel particularly strongly about either side of this, so
I'm happy with you making the decision.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: [COMMITTERS] pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-13 15:02 Tom Lane <tgl@sss.pgh.pa.us>
parent: Stephen Frost <sfrost@snowman.net>
0 siblings, 1 reply; 17+ messages in thread
From: Tom Lane @ 2015-08-13 15:02 UTC (permalink / raw)
To: Stephen Frost <sfrost@snowman.net>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-hackers@postgresql.org
Stephen Frost <sfrost@snowman.net> writes:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
>> Stephen Frost <sfrost@snowman.net> writes:
>>> Have an alternate file for those other cases, rather than remove the
>>> test? The complaint was about one buildfarm member, so hopefully that's
>>> practical and doesn't require a lot of different permutations.
>> I considered that but don't find it practical or attractive, especially
>> not if the only way to keep such a file updated is to wait and see whether
>> the buildfarm complains.
> I agree, that's a bit unfortunate, but it strikes me as pretty unlikely
> that we're ever going to change those tests or that a code change would
> end up causing yet another different plan before 9.1 is completely out
> of support in the next couple years.
Meh. 9.0 will be dead in a month or two, but 9.1 still has a ways to go,
and I don't really want to be dealing with this issue every time Andreas'
fuzz testing finds another corner case :-(. It was hard enough devising
regression tests that used stable table data for those cases as it was.
Frequently, when building a planner regression test, it's important that
a particular plan shape be selected (eg because what you're trying to test
is that setrefs.c postprocessing does the right thing with a given case).
So if we take supporting brolga's behavior as-is as a requirement, it's
not always going to be good enough to just maintain an alternate output
file; we'd have to try to adjust the test query to make it do the right
thing. It's bad enough dealing with 32/64bit and endianness dependencies
for that, I don't want minute compiler codegen choices entering into it
as well.
>> On the whole I'm leaning towards back-patching 33e99153e. While the case
>> of exactly equal plan costs does come up in the regression tests (which
>> tend to inspect plans for queries on small simple tables), I think it's
>> relatively unlikely to happen with real-world data.
> I agree it's unlikely, but I don't particularly like changing our mind
> on a back-patching decision 3 years later to satisfy our regression
> tests.
Actually, I'd take that the other way around: now that the patch has been
out for awhile, and we've not heard squawks that could be traced to it,
there's a much better argument that back-patching would be safe than there
was at the time.
There is certainly some risk in making changes that are only for ease of
maintenance and don't fix a provable bug ... but it's not like the other
changes I've committed into 9.0 and 9.1 lately don't change any
corner-case planner behaviors. Besides, you could argue that it is a bug
if rebuilding with a different compiler can change the planner's behavior.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: [COMMITTERS] pgsql: Further fixes for degenerate outer join clauses.
@ 2015-08-13 15:06 Stephen Frost <sfrost@snowman.net>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 17+ messages in thread
From: Stephen Frost @ 2015-08-13 15:06 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-hackers@postgresql.org
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > I agree, that's a bit unfortunate, but it strikes me as pretty unlikely
> > that we're ever going to change those tests or that a code change would
> > end up causing yet another different plan before 9.1 is completely out
> > of support in the next couple years.
>
> Meh. 9.0 will be dead in a month or two, but 9.1 still has a ways to go,
> and I don't really want to be dealing with this issue every time Andreas'
> fuzz testing finds another corner case :-(. It was hard enough devising
> regression tests that used stable table data for those cases as it was.
>
> Frequently, when building a planner regression test, it's important that
> a particular plan shape be selected (eg because what you're trying to test
> is that setrefs.c postprocessing does the right thing with a given case).
> So if we take supporting brolga's behavior as-is as a requirement, it's
> not always going to be good enough to just maintain an alternate output
> file; we'd have to try to adjust the test query to make it do the right
> thing. It's bad enough dealing with 32/64bit and endianness dependencies
> for that, I don't want minute compiler codegen choices entering into it
> as well.
Certainly a good point.
> >> On the whole I'm leaning towards back-patching 33e99153e. While the case
> >> of exactly equal plan costs does come up in the regression tests (which
> >> tend to inspect plans for queries on small simple tables), I think it's
> >> relatively unlikely to happen with real-world data.
>
> > I agree it's unlikely, but I don't particularly like changing our mind
> > on a back-patching decision 3 years later to satisfy our regression
> > tests.
>
> Actually, I'd take that the other way around: now that the patch has been
> out for awhile, and we've not heard squawks that could be traced to it,
> there's a much better argument that back-patching would be safe than there
> was at the time.
I definitely agree with that when it comes to bug cases, but I'm a bit
more wary around planner changes. Still, I don't recall any specific
complaints about plan changes from pre-9.2 to 9.2+ in such corner cases
and I do agree with you that real data would make this far less likely
to happen.
> There is certainly some risk in making changes that are only for ease of
> maintenance and don't fix a provable bug ... but it's not like the other
> changes I've committed into 9.0 and 9.1 lately don't change any
> corner-case planner behaviors. Besides, you could argue that it is a bug
> if rebuilding with a different compiler can change the planner's behavior.
Good point.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: pgsql: Further fixes for degenerate outer join clauses.
@ 2015-09-12 04:50 Peter Eisentraut <peter_e@gmx.net>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 17+ messages in thread
From: Peter Eisentraut @ 2015-09-12 04:50 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-committers
On 8/6/15 3:36 PM, Tom Lane wrote:
> Further fixes for degenerate outer join clauses.
The <=9.2 versions of this change introduce a new compiler warning:
variable ‘unique_ified’ set but not used [-Wunused-but-set-variable]
This variable is apparently only used in 9.3+ for some LATERAL stuff, so
it could probably be removed in 9.2.
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 17+ messages in thread
* Re: pgsql: Further fixes for degenerate outer join clauses.
@ 2015-09-12 15:11 Tom Lane <tgl@sss.pgh.pa.us>
parent: Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 17+ messages in thread
From: Tom Lane @ 2015-09-12 15:11 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-committers
Peter Eisentraut <peter_e@gmx.net> writes:
> On 8/6/15 3:36 PM, Tom Lane wrote:
>> Further fixes for degenerate outer join clauses.
> The <=9.2 versions of this change introduce a new compiler warning:
> variable ‘unique_ified’ set but not used [-Wunused-but-set-variable]
My compiler didn't complain about that :-(. Fixed, thanks for the note.
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 17+ messages in thread
end of thread, other threads:[~2015-09-12 15:11 UTC | newest]
Thread overview: 17+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-08-06 19:36 pgsql: Further fixes for degenerate outer join clauses. Tom Lane <tgl@sss.pgh.pa.us>
2015-08-06 19:36 pgsql: Further fixes for degenerate outer join clauses. Tom Lane <tgl@sss.pgh.pa.us>
2015-08-06 19:36 pgsql: Further fixes for degenerate outer join clauses. Tom Lane <tgl@sss.pgh.pa.us>
2015-08-06 19:36 pgsql: Further fixes for degenerate outer join clauses. Tom Lane <tgl@sss.pgh.pa.us>
2015-08-06 19:36 pgsql: Further fixes for degenerate outer join clauses. Tom Lane <tgl@sss.pgh.pa.us>
2015-09-12 04:50 ` Peter Eisentraut <peter_e@gmx.net>
2015-09-12 15:11 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-08-06 19:36 pgsql: Further fixes for degenerate outer join clauses. Tom Lane <tgl@sss.pgh.pa.us>
2015-08-12 19:18 ` Andrew Dunstan <andrew@dunslane.net>
2015-08-12 22:41 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-08-13 02:35 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-08-13 14:10 ` Stephen Frost <sfrost@snowman.net>
2015-08-13 14:26 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-08-13 14:38 ` Stephen Frost <sfrost@snowman.net>
2015-08-13 15:02 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-08-13 15:06 ` Stephen Frost <sfrost@snowman.net>
2015-08-06 19:36 pgsql: Further fixes for degenerate outer join clauses. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox