Re: ERROR: no relation entry for relid 6 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ERROR: no relation entry for relid 6
Date
Msg-id 239048.1686258819@sss.pgh.pa.us
Whole thread Raw
In response to Re: ERROR: no relation entry for relid 6  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: ERROR: no relation entry for relid 6
List pgsql-hackers
Richard Guo <guofenglinux@gmail.com> writes:
> On Tue, May 30, 2023 at 10:28 AM Richard Guo <guofenglinux@gmail.com> wrote:
>> I haven't thought through how to fix it, but I suspect that we may need
>> to do more checking before we decide to remove PHVs in
>> remove_rel_from_query.

Oh, I like this example!  It shows a place where we are now smarter
than we used to be, because v15 and earlier fail to recognize that
the join could be removed.  But we do have to clean up the query
properly afterwards.

> 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.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Let's make PostgreSQL multi-threaded
Next
From: Jeff Davis
Date:
Subject: Re: Order changes in PG16 since ICU introduction