pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Simplify LATERAL-related calculations within add_paths_to_joinre
4+ messages / 1 participants
[nested] [flat]

* pgsql: Simplify LATERAL-related calculations within add_paths_to_joinre
@ 2015-12-07 23:56 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2015-12-07 23:56 UTC (permalink / raw)
  To: pgsql-committers

Simplify LATERAL-related calculations within add_paths_to_joinrel().

While convincing myself that commit 7e19db0c09719d79 would solve both of
the problems recently reported by Andreas Seltenreich, I realized that
add_paths_to_joinrel's handling of LATERAL restrictions could be made
noticeably simpler and faster if we were to retain the minimum possible
parameterization for each joinrel (that is, the set of relids supplying
unsatisfied lateral references in it).  We already retain that for
baserels, in RelOptInfo.lateral_relids, so we can use that field for
joinrels too.

I re-pgindent'd the files touched here, which affects some unrelated
comments.

This is, I believe, just a minor optimization not a bug fix, so no
back-patch.

Branch
------
master

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

Modified Files
--------------
src/backend/nodes/outfuncs.c          |    2 +-
src/backend/optimizer/path/joinpath.c |   73 +++++++--------------------------
src/backend/optimizer/util/relnode.c  |   22 +++++-----
src/include/nodes/relation.h          |   18 ++++----
4 files changed, 36 insertions(+), 79 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: Simplify LATERAL-related calculations within add_paths_to_joinre
@ 2015-12-09 23:54 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2015-12-09 23:54 UTC (permalink / raw)
  To: pgsql-committers

Simplify LATERAL-related calculations within add_paths_to_joinrel().

While convincing myself that commit 7e19db0c09719d79 would solve both of
the problems recently reported by Andreas Seltenreich, I realized that
add_paths_to_joinrel's handling of LATERAL restrictions could be made
noticeably simpler and faster if we were to retain the minimum possible
parameterization for each joinrel (that is, the set of relids supplying
unsatisfied lateral references in it).  We already retain that for
baserels, in RelOptInfo.lateral_relids, so we can use that field for
joinrels too.

This is a back-port of commit edca44b1525b3d591263d032dc4fe500ea771e0e.
I originally intended not to back-patch that, but additional hacking
in this area turns out to be needed, making it necessary not optional
to compute lateral_relids for joinrels.  In preparation for those fixes,
sync the relevant code with HEAD as much as practical.  (I did not risk
rearranging fields of RelOptInfo in released branches, however.)

Branch
------
REL9_5_STABLE

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

Modified Files
--------------
src/backend/nodes/outfuncs.c          |    2 +-
src/backend/optimizer/path/joinpath.c |   73 +++++++--------------------------
src/backend/optimizer/util/relnode.c  |    4 +-
src/include/nodes/relation.h          |   12 +++---
4 files changed, 24 insertions(+), 67 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: Simplify LATERAL-related calculations within add_paths_to_joinre
@ 2015-12-09 23:54 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2015-12-09 23:54 UTC (permalink / raw)
  To: pgsql-committers

Simplify LATERAL-related calculations within add_paths_to_joinrel().

While convincing myself that commit 7e19db0c09719d79 would solve both of
the problems recently reported by Andreas Seltenreich, I realized that
add_paths_to_joinrel's handling of LATERAL restrictions could be made
noticeably simpler and faster if we were to retain the minimum possible
parameterization for each joinrel (that is, the set of relids supplying
unsatisfied lateral references in it).  We already retain that for
baserels, in RelOptInfo.lateral_relids, so we can use that field for
joinrels too.

This is a back-port of commit edca44b1525b3d591263d032dc4fe500ea771e0e.
I originally intended not to back-patch that, but additional hacking
in this area turns out to be needed, making it necessary not optional
to compute lateral_relids for joinrels.  In preparation for those fixes,
sync the relevant code with HEAD as much as practical.  (I did not risk
rearranging fields of RelOptInfo in released branches, however.)

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/7145d35c1727e12cc492c60a2c34392b5ed0dfa5

Modified Files
--------------
src/backend/optimizer/path/joinpath.c |  113 ++++++++-------------------------
src/backend/optimizer/util/relnode.c  |    2 +-
src/include/nodes/relation.h          |    4 +-
3 files changed, 28 insertions(+), 91 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: Simplify LATERAL-related calculations within add_paths_to_joinre
@ 2015-12-09 23:54 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2015-12-09 23:54 UTC (permalink / raw)
  To: pgsql-committers

Simplify LATERAL-related calculations within add_paths_to_joinrel().

While convincing myself that commit 7e19db0c09719d79 would solve both of
the problems recently reported by Andreas Seltenreich, I realized that
add_paths_to_joinrel's handling of LATERAL restrictions could be made
noticeably simpler and faster if we were to retain the minimum possible
parameterization for each joinrel (that is, the set of relids supplying
unsatisfied lateral references in it).  We already retain that for
baserels, in RelOptInfo.lateral_relids, so we can use that field for
joinrels too.

This is a back-port of commit edca44b1525b3d591263d032dc4fe500ea771e0e.
I originally intended not to back-patch that, but additional hacking
in this area turns out to be needed, making it necessary not optional
to compute lateral_relids for joinrels.  In preparation for those fixes,
sync the relevant code with HEAD as much as practical.  (I did not risk
rearranging fields of RelOptInfo in released branches, however.)

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/54497807b3941b5e30bfe77ca6136a6163d4f199

Modified Files
--------------
src/backend/optimizer/path/joinpath.c |  113 ++++++++-------------------------
src/backend/optimizer/util/relnode.c  |    2 +-
src/include/nodes/relation.h          |    4 +-
3 files changed, 28 insertions(+), 91 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-12-09 23:54 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-12-07 23:56 pgsql: Simplify LATERAL-related calculations within add_paths_to_joinre Tom Lane <tgl@sss.pgh.pa.us>
2015-12-09 23:54 pgsql: Simplify LATERAL-related calculations within add_paths_to_joinre Tom Lane <tgl@sss.pgh.pa.us>
2015-12-09 23:54 pgsql: Simplify LATERAL-related calculations within add_paths_to_joinre Tom Lane <tgl@sss.pgh.pa.us>
2015-12-09 23:54 pgsql: Simplify LATERAL-related calculations within add_paths_to_joinre 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