Re: BUG #19435: Error: "No relation entry for relid 2" Triggered by Complex Join with Self-Referencing Tables
Kirill Reshke <reshkekirill@gmail.com>
From: Kirill Reshke <reshkekirill@gmail.com>
To: Andrei Lepikhov <lepihov@gmail.com>
Cc: Alexander Korotkov <aekorotkov@gmail.com>,
Tender Wang <tndrwang@gmail.com>, Fujii Masao <masao.fujii@gmail.com>, ammmkilo@163.com,
pgsql-bugs@lists.postgresql.org
Date: 2026-03-18T17:55:22Z
Lists: pgsql-bugs
On Wed, 18 Mar 2026 at 18:31, Andrei Lepikhov <lepihov@gmail.com> wrote: > > On 18/3/26 13:21, Alexander Korotkov wrote: > > On Wed, Mar 18, 2026 at 2:18 PM Andrei Lepikhov <lepihov@gmail.com> wrote: > >> What is the reason for the second change? Tender, can you show us how to > >> reproduce the issue so we can support your update to > >> restrict_infos_logically_equal? If we include it, we should add a test. > > > > I think Tender already shown this in [1]. The same qual is present > > twice in the plan. > Got it. I suggest making this a separate commit to keep the history > clear. Let me share a draft with a test case for the bug fix first. > > -- > regards, Andrei Lepikhov, > pgEdge Hi! Is `cool_bool` a typo of `col_bool` in regression test ? -- Best regards, Kirill Reshke
Commits
-
Further improve commentary about ChangeVarNodesWalkExpression()
- 6888658516a2 19 (unreleased) landed
- 8c73ab9da9f1 18.4 landed
-
Improve commentary about ChangeVarNodesWalkExpression().
- a0e0b3cc685a 18.4 landed
- 360dd6f7b4c5 19 (unreleased) landed
-
Fix self-join removal to update bare Var references in join clauses
- e8b9d6497469 18.4 landed
- 07b7a964d368 19 (unreleased) landed
-
Implement Self-Join Elimination
- fc069a3a6319 18.0 cited