Re: BUG #18170: Unexpected error: no relation entry for relid 3
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Andrei Lepikhov <a.lepikhov@postgrespro.ru>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alexander Korotkov <aekorotkov@gmail.com>, Vik Fearing <vik@postgresfriends.org>, zuming.jiang@inf.ethz.ch, pgsql-bugs@lists.postgresql.org, Alexander Korotkov <akorotkov@postgresql.org>
Date: 2023-10-30T06:24:01Z
Lists: pgsql-bugs
On Mon, Oct 30, 2023 at 10:47 AM Andrei Lepikhov <a.lepikhov@postgrespro.ru> wrote: > On 30/10/2023 09:24, Richard Guo wrote: > > I also have some concerns about this patch. It requires that > > root->parse remains unchanged during the whole subquery_planner() in > > order to work, which is an implicit constraint we did not have before. > > It is not about unchanged; it is about referencing the same query at the > parent and child query blocks. Am I missing something? Yeah, that's what I meant. We need to ensure that root->parse references the same Query structure during the whole subquery_planner() for this patch to work, which seems hacky, and error-prone for future development. If we really want to do so, at least we need to emphasize this point in the comment of subquery_planner(). Thanks Richard
Commits
-
Disable run condition optimization for some WindowFuncs
- 7e5d20bbd13f 15.7 landed
- 9d36b883bfaa 16.3 landed
-
Fix allocation of UniqueRelInfo
- 93c85db3b5b8 17.0 landed
-
Make UniqueRelInfo a node
- 2b26a6945545 17.0 cited
-
Add "Add trailing commas to enum definitions" to .git-blame-ignore-revs
- 26f988212ead 17.0 cited
-
Remove useless self-joins
- d3d55ce57136 17.0 cited