pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix old oversight in join removal logic.
4+ messages / 1 participants
[nested] [flat]

* pgsql: Fix old oversight in join removal logic.
@ 2015-08-07 02:14  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2015-08-07 02:14 UTC (permalink / raw)
  To: pgsql-committers

Fix old oversight in join removal logic.

Commit 9e7e29c75ad441450f9b8287bd51c13521641e3b introduced an Assert that
join removal didn't reduce the eval_at set of any PlaceHolderVar to empty.
At first glance it looks like join_is_removable ensures that's true --- but
actually, the loop in join_is_removable skips PlaceHolderVars that are not
referenced above the join due to be removed.  So, if we don't want any
empty eval_at sets, the right thing to do is to delete any now-unreferenced
PlaceHolderVars from the data structure entirely.

Per fuzz testing by Andreas Seltenreich.  Back-patch to 9.3 where the
aforesaid Assert was added.

Branch
------
REL9_3_STABLE

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

Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c |   20 ++++++++++++++------
src/test/regress/expected/join.out        |   16 ++++++++++++++++
src/test/regress/sql/join.sql             |   15 +++++++++++++++
3 files changed, 45 insertions(+), 6 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] 4+ messages in thread

* pgsql: Fix old oversight in join removal logic.
@ 2015-08-07 02:14  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2015-08-07 02:14 UTC (permalink / raw)
  To: pgsql-committers

Fix old oversight in join removal logic.

Commit 9e7e29c75ad441450f9b8287bd51c13521641e3b introduced an Assert that
join removal didn't reduce the eval_at set of any PlaceHolderVar to empty.
At first glance it looks like join_is_removable ensures that's true --- but
actually, the loop in join_is_removable skips PlaceHolderVars that are not
referenced above the join due to be removed.  So, if we don't want any
empty eval_at sets, the right thing to do is to delete any now-unreferenced
PlaceHolderVars from the data structure entirely.

Per fuzz testing by Andreas Seltenreich.  Back-patch to 9.3 where the
aforesaid Assert was added.

Branch
------
REL9_5_STABLE

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

Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c |   20 ++++++++++++++------
src/test/regress/expected/join.out        |   16 ++++++++++++++++
src/test/regress/sql/join.sql             |   15 +++++++++++++++
3 files changed, 45 insertions(+), 6 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] 4+ messages in thread

* pgsql: Fix old oversight in join removal logic.
@ 2015-08-07 02:14  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2015-08-07 02:14 UTC (permalink / raw)
  To: pgsql-committers

Fix old oversight in join removal logic.

Commit 9e7e29c75ad441450f9b8287bd51c13521641e3b introduced an Assert that
join removal didn't reduce the eval_at set of any PlaceHolderVar to empty.
At first glance it looks like join_is_removable ensures that's true --- but
actually, the loop in join_is_removable skips PlaceHolderVars that are not
referenced above the join due to be removed.  So, if we don't want any
empty eval_at sets, the right thing to do is to delete any now-unreferenced
PlaceHolderVars from the data structure entirely.

Per fuzz testing by Andreas Seltenreich.  Back-patch to 9.3 where the
aforesaid Assert was added.

Branch
------
master

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

Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c |   20 ++++++++++++++------
src/test/regress/expected/join.out        |   16 ++++++++++++++++
src/test/regress/sql/join.sql             |   15 +++++++++++++++
3 files changed, 45 insertions(+), 6 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] 4+ messages in thread

* pgsql: Fix old oversight in join removal logic.
@ 2015-08-07 02:14  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2015-08-07 02:14 UTC (permalink / raw)
  To: pgsql-committers

Fix old oversight in join removal logic.

Commit 9e7e29c75ad441450f9b8287bd51c13521641e3b introduced an Assert that
join removal didn't reduce the eval_at set of any PlaceHolderVar to empty.
At first glance it looks like join_is_removable ensures that's true --- but
actually, the loop in join_is_removable skips PlaceHolderVars that are not
referenced above the join due to be removed.  So, if we don't want any
empty eval_at sets, the right thing to do is to delete any now-unreferenced
PlaceHolderVars from the data structure entirely.

Per fuzz testing by Andreas Seltenreich.  Back-patch to 9.3 where the
aforesaid Assert was added.

Branch
------
REL9_4_STABLE

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

Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c |   20 ++++++++++++++------
src/test/regress/expected/join.out        |   16 ++++++++++++++++
src/test/regress/sql/join.sql             |   15 +++++++++++++++
3 files changed, 45 insertions(+), 6 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] 4+ messages in thread


end of thread, other threads:[~2015-08-07 02:14 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 02:14 pgsql: Fix old oversight in join removal logic. Tom Lane <tgl@sss.pgh.pa.us>
2015-08-07 02:14 pgsql: Fix old oversight in join removal logic. Tom Lane <tgl@sss.pgh.pa.us>
2015-08-07 02:14 pgsql: Fix old oversight in join removal logic. Tom Lane <tgl@sss.pgh.pa.us>
2015-08-07 02:14 pgsql: Fix old oversight in join removal logic. 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