pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix Asserts in calc_non_nestloop_required_outer().
Date: Wed, 10 Jan 2024 18:51:44 +0000
Message-ID: <E1rNdg0-000o5i-09@gemulon.postgresql.org> (raw)

Fix Asserts in calc_non_nestloop_required_outer().

These were not testing the same thing as the comparable Assert
in calc_nestloop_required_outer(), because we neglected to map
the given Paths' relids to top-level relids.  When considering
a partition child join the latter is the correct thing to do.

This oversight is old, but since it's only an overly-weak Assert
check there doesn't seem to be much value in back-patching.

Richard Guo (with cosmetic changes and comment updates by me)

Discussion: https://postgr.es/m/CAMbWs49sqbe9GBZ8sy8dSfKRNURgicR85HX8vgzcgQsPF0XY1w@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/optimizer/path/joinpath.c |  7 +++++--
src/backend/optimizer/util/pathnode.c | 26 ++++++++++++++++++++++++--
2 files changed, 29 insertions(+), 4 deletions(-)



Message-ID: <E1rNdg0-000o5i-09@gemulon.postgresql.org>
Permalink:  ../E1rNdg0-000o5i-09@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rNdg0-000o5i-09@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix Asserts in calc_non_nestloop_required_outer().
  In-Reply-To: <E1rNdg0-000o5i-09@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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