pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix miscomputation of direct_lateral_relids for join relations.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix miscomputation of direct_lateral_relids for join relations.
@ 2020-11-30 17:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-11-30 17:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix miscomputation of direct_lateral_relids for join relations.

If a PlaceHolderVar is to be evaluated at a join relation, but
its value is only needed there and not at higher levels, we neglected
to update the joinrel's direct_lateral_relids to include the PHV's
source rel.  This causes problems because join_is_legal() then won't
allow joining the joinrel to the PHV's source rel at all, leading
to "failed to build any N-way joins" planner failures.

Per report from Andreas Seltenreich.  Back-patch to 9.5
where the problem originated.

Discussion: https://postgr.es/m/87blfgqa4t.fsf@aurora.ydns.eu

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4f728a1f5f06dab85f6b94fd062752a25239c6b6

Modified Files
--------------
src/backend/optimizer/util/placeholder.c | 38 +++++++++++++------
src/test/regress/expected/join.out       | 64 ++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql            | 27 ++++++++++++++
3 files changed, 118 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix miscomputation of direct_lateral_relids for join relations.
@ 2020-11-30 17:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-11-30 17:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix miscomputation of direct_lateral_relids for join relations.

If a PlaceHolderVar is to be evaluated at a join relation, but
its value is only needed there and not at higher levels, we neglected
to update the joinrel's direct_lateral_relids to include the PHV's
source rel.  This causes problems because join_is_legal() then won't
allow joining the joinrel to the PHV's source rel at all, leading
to "failed to build any N-way joins" planner failures.

Per report from Andreas Seltenreich.  Back-patch to 9.5
where the problem originated.

Discussion: https://postgr.es/m/87blfgqa4t.fsf@aurora.ydns.eu

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ab4cbb4bceff6f939f12d0edbe84004d85ebea16

Modified Files
--------------
src/backend/optimizer/util/placeholder.c | 38 +++++++++++++------
src/test/regress/expected/join.out       | 64 ++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql            | 27 ++++++++++++++
3 files changed, 118 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix miscomputation of direct_lateral_relids for join relations.
@ 2020-11-30 17:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-11-30 17:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix miscomputation of direct_lateral_relids for join relations.

If a PlaceHolderVar is to be evaluated at a join relation, but
its value is only needed there and not at higher levels, we neglected
to update the joinrel's direct_lateral_relids to include the PHV's
source rel.  This causes problems because join_is_legal() then won't
allow joining the joinrel to the PHV's source rel at all, leading
to "failed to build any N-way joins" planner failures.

Per report from Andreas Seltenreich.  Back-patch to 9.5
where the problem originated.

Discussion: https://postgr.es/m/87blfgqa4t.fsf@aurora.ydns.eu

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8c5da2d512e3e00c55f3f8fb7af12dfabc5b9284

Modified Files
--------------
src/backend/optimizer/util/placeholder.c | 39 +++++++++++++------
src/test/regress/expected/join.out       | 64 ++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql            | 27 ++++++++++++++
3 files changed, 118 insertions(+), 12 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix miscomputation of direct_lateral_relids for join relations.
@ 2020-11-30 17:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-11-30 17:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix miscomputation of direct_lateral_relids for join relations.

If a PlaceHolderVar is to be evaluated at a join relation, but
its value is only needed there and not at higher levels, we neglected
to update the joinrel's direct_lateral_relids to include the PHV's
source rel.  This causes problems because join_is_legal() then won't
allow joining the joinrel to the PHV's source rel at all, leading
to "failed to build any N-way joins" planner failures.

Per report from Andreas Seltenreich.  Back-patch to 9.5
where the problem originated.

Discussion: https://postgr.es/m/87blfgqa4t.fsf@aurora.ydns.eu

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b1738ff6ab73203cbbc02d7fb82941dbc061d301

Modified Files
--------------
src/backend/optimizer/util/placeholder.c | 38 +++++++++++++------
src/test/regress/expected/join.out       | 64 ++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql            | 27 ++++++++++++++
3 files changed, 118 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix miscomputation of direct_lateral_relids for join relations.
@ 2020-11-30 17:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-11-30 17:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix miscomputation of direct_lateral_relids for join relations.

If a PlaceHolderVar is to be evaluated at a join relation, but
its value is only needed there and not at higher levels, we neglected
to update the joinrel's direct_lateral_relids to include the PHV's
source rel.  This causes problems because join_is_legal() then won't
allow joining the joinrel to the PHV's source rel at all, leading
to "failed to build any N-way joins" planner failures.

Per report from Andreas Seltenreich.  Back-patch to 9.5
where the problem originated.

Discussion: https://postgr.es/m/87blfgqa4t.fsf@aurora.ydns.eu

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/caecab229abdcac05bdeb8ac94e78194dfc71f5c

Modified Files
--------------
src/backend/optimizer/util/placeholder.c | 38 +++++++++++++------
src/test/regress/expected/join.out       | 64 ++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql            | 27 ++++++++++++++
3 files changed, 118 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix miscomputation of direct_lateral_relids for join relations.
@ 2020-11-30 17:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-11-30 17:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix miscomputation of direct_lateral_relids for join relations.

If a PlaceHolderVar is to be evaluated at a join relation, but
its value is only needed there and not at higher levels, we neglected
to update the joinrel's direct_lateral_relids to include the PHV's
source rel.  This causes problems because join_is_legal() then won't
allow joining the joinrel to the PHV's source rel at all, leading
to "failed to build any N-way joins" planner failures.

Per report from Andreas Seltenreich.  Back-patch to 9.5
where the problem originated.

Discussion: https://postgr.es/m/87blfgqa4t.fsf@aurora.ydns.eu

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/666a4de939bf78df7295c35899a5f2e89eaea382

Modified Files
--------------
src/backend/optimizer/util/placeholder.c | 38 +++++++++++++------
src/test/regress/expected/join.out       | 64 ++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql            | 27 ++++++++++++++
3 files changed, 118 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix miscomputation of direct_lateral_relids for join relations.
@ 2020-11-30 17:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2020-11-30 17:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix miscomputation of direct_lateral_relids for join relations.

If a PlaceHolderVar is to be evaluated at a join relation, but
its value is only needed there and not at higher levels, we neglected
to update the joinrel's direct_lateral_relids to include the PHV's
source rel.  This causes problems because join_is_legal() then won't
allow joining the joinrel to the PHV's source rel at all, leading
to "failed to build any N-way joins" planner failures.

Per report from Andreas Seltenreich.  Back-patch to 9.5
where the problem originated.

Discussion: https://postgr.es/m/87blfgqa4t.fsf@aurora.ydns.eu

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/785f4462daaf6897ab3ac56b3170c2f988d0e93f

Modified Files
--------------
src/backend/optimizer/util/placeholder.c | 38 +++++++++++++------
src/test/regress/expected/join.out       | 64 ++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql            | 27 ++++++++++++++
3 files changed, 118 insertions(+), 11 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2020-11-30 17:23 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30 17:23 pgsql: Fix miscomputation of direct_lateral_relids for join relations. Tom Lane <tgl@sss.pgh.pa.us>
2020-11-30 17:23 pgsql: Fix miscomputation of direct_lateral_relids for join relations. Tom Lane <tgl@sss.pgh.pa.us>
2020-11-30 17:23 pgsql: Fix miscomputation of direct_lateral_relids for join relations. Tom Lane <tgl@sss.pgh.pa.us>
2020-11-30 17:23 pgsql: Fix miscomputation of direct_lateral_relids for join relations. Tom Lane <tgl@sss.pgh.pa.us>
2020-11-30 17:23 pgsql: Fix miscomputation of direct_lateral_relids for join relations. Tom Lane <tgl@sss.pgh.pa.us>
2020-11-30 17:23 pgsql: Fix miscomputation of direct_lateral_relids for join relations. Tom Lane <tgl@sss.pgh.pa.us>
2020-11-30 17:23 pgsql: Fix miscomputation of direct_lateral_relids for join relations. 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