Fix bogus Asserts in calc_non_nestloop_required_outer

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2023-08-03T02:24:48Z
Lists: pgsql-hackers

Attachments

As stated in [1], all paths arriving here are parameterized by top
parents, so we should check against top_parent_relids if it exists in
the two Asserts.

Attached is a patch fixing that.

[1]
https://www.postgresql.org/message-id/CAMbWs4_UoVcCwkVMfi9TjSC%3Do5U6BRHUNZiVhrvSbDfU2HaeDA%40mail.gmail.com

Thanks
Richard

Commits

  1. Fix Asserts in calc_non_nestloop_required_outer().