Re: ERROR: no relation entry for relid 6

Richard Guo <guofenglinux@gmail.com>

From: Richard Guo <guofenglinux@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2023-06-09T03:16:20Z
Lists: pgsql-hackers
On Fri, Jun 9, 2023 at 5:13 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Richard Guo <guofenglinux@gmail.com> writes:
> > Hmm, maybe we can additionally check if the PHV needs to be evaluated
> > above the join.  If so it cannot be removed.
> Yeah, that seems to make sense, and it squares with the existing
> comment saying that PHVs used above the join can't be removed.
> Pushed that way.


Thanks for pushing it!  I've closed the open item for it.

Thanks
Richard

Commits

  1. Fix oversight in outer join removal.

  2. Fix joinclause removal logic to cope with cloned clauses.