pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Undo mistaken tightening in join_is_legal().
7+ messages / 1 participants
[nested] [flat]

* pgsql: Undo mistaken tightening in join_is_legal().
@ 2015-08-13 01:19  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2015-08-13 01:19 UTC (permalink / raw)
  To: pgsql-committers

Undo mistaken tightening in join_is_legal().

One of the changes I made in commit 8703059c6b55c427 turns out not to have
been such a good idea: we still need the exception in join_is_legal() that
allows a join if both inputs already overlap the RHS of the special join
we're checking.  Otherwise we can miss valid plans, and might indeed fail
to find a plan at all, as in recent report from Andreas Seltenreich.

That code was added way back in commit c17117649b9ae23d, but I failed to
include a regression test case then; my bad.  Put it back with a better
explanation, and a test this time.  The logic does end up a bit different
than before though: I now believe it's appropriate to make this check
first, thereby allowing such a case whether or not we'd consider the
previous SJ(s) to commute with this one.  (Presumably, we already decided
they did; but it was confusing to have this consideration in the middle
of the code that was handling the other case.)

Back-patch to all active branches, like the previous patch.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/4390ba7bf937f56f647359b52e6ba04f31b21901

Modified Files
--------------
src/backend/optimizer/path/joinrels.c |   29 +++++++++++++++++----
src/test/regress/expected/join.out    |   46 +++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql         |   19 ++++++++++++++
3 files changed, 89 insertions(+), 5 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] 7+ messages in thread

* pgsql: Undo mistaken tightening in join_is_legal().
@ 2015-08-13 01:19  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2015-08-13 01:19 UTC (permalink / raw)
  To: pgsql-committers

Undo mistaken tightening in join_is_legal().

One of the changes I made in commit 8703059c6b55c427 turns out not to have
been such a good idea: we still need the exception in join_is_legal() that
allows a join if both inputs already overlap the RHS of the special join
we're checking.  Otherwise we can miss valid plans, and might indeed fail
to find a plan at all, as in recent report from Andreas Seltenreich.

That code was added way back in commit c17117649b9ae23d, but I failed to
include a regression test case then; my bad.  Put it back with a better
explanation, and a test this time.  The logic does end up a bit different
than before though: I now believe it's appropriate to make this check
first, thereby allowing such a case whether or not we'd consider the
previous SJ(s) to commute with this one.  (Presumably, we already decided
they did; but it was confusing to have this consideration in the middle
of the code that was handling the other case.)

Back-patch to all active branches, like the previous patch.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/cfe30a72fa80528997357cb0780412736767e8c4

Modified Files
--------------
src/backend/optimizer/path/joinrels.c |   29 +++++++++++++++++----
src/test/regress/expected/join.out    |   46 +++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql         |   19 ++++++++++++++
3 files changed, 89 insertions(+), 5 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] 7+ messages in thread

* pgsql: Undo mistaken tightening in join_is_legal().
@ 2015-08-13 01:19  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2015-08-13 01:19 UTC (permalink / raw)
  To: pgsql-committers

Undo mistaken tightening in join_is_legal().

One of the changes I made in commit 8703059c6b55c427 turns out not to have
been such a good idea: we still need the exception in join_is_legal() that
allows a join if both inputs already overlap the RHS of the special join
we're checking.  Otherwise we can miss valid plans, and might indeed fail
to find a plan at all, as in recent report from Andreas Seltenreich.

That code was added way back in commit c17117649b9ae23d, but I failed to
include a regression test case then; my bad.  Put it back with a better
explanation, and a test this time.  The logic does end up a bit different
than before though: I now believe it's appropriate to make this check
first, thereby allowing such a case whether or not we'd consider the
previous SJ(s) to commute with this one.  (Presumably, we already decided
they did; but it was confusing to have this consideration in the middle
of the code that was handling the other case.)

Back-patch to all active branches, like the previous patch.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/8cd3a7adabcd1837a1aca80f11257ef11589630f

Modified Files
--------------
src/backend/optimizer/path/joinrels.c |   29 +++++++++++++++++----
src/test/regress/expected/join.out    |   46 +++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql         |   19 ++++++++++++++
3 files changed, 89 insertions(+), 5 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] 7+ messages in thread

* pgsql: Undo mistaken tightening in join_is_legal().
@ 2015-08-13 01:19  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2015-08-13 01:19 UTC (permalink / raw)
  To: pgsql-committers

Undo mistaken tightening in join_is_legal().

One of the changes I made in commit 8703059c6b55c427 turns out not to have
been such a good idea: we still need the exception in join_is_legal() that
allows a join if both inputs already overlap the RHS of the special join
we're checking.  Otherwise we can miss valid plans, and might indeed fail
to find a plan at all, as in recent report from Andreas Seltenreich.

That code was added way back in commit c17117649b9ae23d, but I failed to
include a regression test case then; my bad.  Put it back with a better
explanation, and a test this time.  The logic does end up a bit different
than before though: I now believe it's appropriate to make this check
first, thereby allowing such a case whether or not we'd consider the
previous SJ(s) to commute with this one.  (Presumably, we already decided
they did; but it was confusing to have this consideration in the middle
of the code that was handling the other case.)

Back-patch to all active branches, like the previous patch.

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7950657a92d108458508eb690e0aa6322640e5e5

Modified Files
--------------
src/backend/optimizer/path/joinrels.c |   29 +++++++++++++++++----
src/test/regress/expected/join.out    |   46 +++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql         |   19 ++++++++++++++
3 files changed, 89 insertions(+), 5 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] 7+ messages in thread

* pgsql: Undo mistaken tightening in join_is_legal().
@ 2015-08-13 01:19  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2015-08-13 01:19 UTC (permalink / raw)
  To: pgsql-committers

Undo mistaken tightening in join_is_legal().

One of the changes I made in commit 8703059c6b55c427 turns out not to have
been such a good idea: we still need the exception in join_is_legal() that
allows a join if both inputs already overlap the RHS of the special join
we're checking.  Otherwise we can miss valid plans, and might indeed fail
to find a plan at all, as in recent report from Andreas Seltenreich.

That code was added way back in commit c17117649b9ae23d, but I failed to
include a regression test case then; my bad.  Put it back with a better
explanation, and a test this time.  The logic does end up a bit different
than before though: I now believe it's appropriate to make this check
first, thereby allowing such a case whether or not we'd consider the
previous SJ(s) to commute with this one.  (Presumably, we already decided
they did; but it was confusing to have this consideration in the middle
of the code that was handling the other case.)

Back-patch to all active branches, like the previous patch.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ec94bc1473475128ef4e7b62636e66effd314102

Modified Files
--------------
src/backend/optimizer/path/joinrels.c |   29 +++++++++++++++++----
src/test/regress/expected/join.out    |   46 +++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql         |   19 ++++++++++++++
3 files changed, 89 insertions(+), 5 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] 7+ messages in thread

* pgsql: Undo mistaken tightening in join_is_legal().
@ 2015-08-13 01:19  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2015-08-13 01:19 UTC (permalink / raw)
  To: pgsql-committers

Undo mistaken tightening in join_is_legal().

One of the changes I made in commit 8703059c6b55c427 turns out not to have
been such a good idea: we still need the exception in join_is_legal() that
allows a join if both inputs already overlap the RHS of the special join
we're checking.  Otherwise we can miss valid plans, and might indeed fail
to find a plan at all, as in recent report from Andreas Seltenreich.

That code was added way back in commit c17117649b9ae23d, but I failed to
include a regression test case then; my bad.  Put it back with a better
explanation, and a test this time.  The logic does end up a bit different
than before though: I now believe it's appropriate to make this check
first, thereby allowing such a case whether or not we'd consider the
previous SJ(s) to commute with this one.  (Presumably, we already decided
they did; but it was confusing to have this consideration in the middle
of the code that was handling the other case.)

Back-patch to all active branches, like the previous patch.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7b4b57fc484ab8edb4c921cd4b18f2b5b379ef44

Modified Files
--------------
src/backend/optimizer/path/joinrels.c |   29 +++++++++++++++++----
src/test/regress/expected/join.out    |   46 +++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql         |   19 ++++++++++++++
3 files changed, 89 insertions(+), 5 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] 7+ messages in thread

* pgsql: Undo mistaken tightening in join_is_legal().
@ 2015-08-13 01:19  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2015-08-13 01:19 UTC (permalink / raw)
  To: pgsql-committers

Undo mistaken tightening in join_is_legal().

One of the changes I made in commit 8703059c6b55c427 turns out not to have
been such a good idea: we still need the exception in join_is_legal() that
allows a join if both inputs already overlap the RHS of the special join
we're checking.  Otherwise we can miss valid plans, and might indeed fail
to find a plan at all, as in recent report from Andreas Seltenreich.

That code was added way back in commit c17117649b9ae23d, but I failed to
include a regression test case then; my bad.  Put it back with a better
explanation, and a test this time.  The logic does end up a bit different
than before though: I now believe it's appropriate to make this check
first, thereby allowing such a case whether or not we'd consider the
previous SJ(s) to commute with this one.  (Presumably, we already decided
they did; but it was confusing to have this consideration in the middle
of the code that was handling the other case.)

Back-patch to all active branches, like the previous patch.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/866197d828a85d80886871801b1d084dd3116936

Modified Files
--------------
src/backend/optimizer/path/joinrels.c |   29 +++++++++++++++++----
src/test/regress/expected/join.out    |   46 +++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql         |   19 ++++++++++++++
3 files changed, 89 insertions(+), 5 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] 7+ messages in thread


end of thread, other threads:[~2015-08-13 01:19 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-08-13 01:19 pgsql: Undo mistaken tightening in join_is_legal(). Tom Lane <tgl@sss.pgh.pa.us>
2015-08-13 01:19 pgsql: Undo mistaken tightening in join_is_legal(). Tom Lane <tgl@sss.pgh.pa.us>
2015-08-13 01:19 pgsql: Undo mistaken tightening in join_is_legal(). Tom Lane <tgl@sss.pgh.pa.us>
2015-08-13 01:19 pgsql: Undo mistaken tightening in join_is_legal(). Tom Lane <tgl@sss.pgh.pa.us>
2015-08-13 01:19 pgsql: Undo mistaken tightening in join_is_legal(). Tom Lane <tgl@sss.pgh.pa.us>
2015-08-13 01:19 pgsql: Undo mistaken tightening in join_is_legal(). Tom Lane <tgl@sss.pgh.pa.us>
2015-08-13 01:19 pgsql: Undo mistaken tightening in join_is_legal(). 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