Re: BUG #18170: Unexpected error: no relation entry for relid 3

Alexander Korotkov <aekorotkov@gmail.com>

From: Alexander Korotkov <aekorotkov@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Richard Guo <guofenglinux@gmail.com>, Andrei Lepikhov <a.lepikhov@postgrespro.ru>, Vik Fearing <vik@postgresfriends.org>, zuming.jiang@inf.ethz.ch, pgsql-bugs@lists.postgresql.org, Alexander Korotkov <akorotkov@postgresql.org>
Date: 2023-11-01T10:29:12Z
Lists: pgsql-bugs
On Sat, Oct 28, 2023 at 12:12 AM Alexander Korotkov
<aekorotkov@gmail.com> wrote:
>
> On Fri, Oct 27, 2023 at 5:41 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Richard Guo <guofenglinux@gmail.com> writes:
> > > Alternatively, can we look at subroot->parse->targetList instead of
> > > subquery->targetList where we call estimate_num_groups on the output of
> > > the subquery?
> >
> > Please read the comment just above that.
>
> Thank you, Tom,  This is clear.


Hmm...  I just found that I wasn't attentive enough.  The proposed
change is to use subroot->parse->targetList, not
subroot->processed_tlist.  I don't know what could be the problem
here.

------
Regards,
Alexander Korotkov



Commits

  1. Disable run condition optimization for some WindowFuncs

  2. Fix allocation of UniqueRelInfo

  3. Make UniqueRelInfo a node

  4. Add "Add trailing commas to enum definitions" to .git-blame-ignore-revs

  5. Remove useless self-joins