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

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Vik Fearing <vik(at)postgresfriends(dot)org>, zuming(dot)jiang(at)inf(dot)ethz(dot)ch, pgsql-bugs(at)lists(dot)postgresql(dot)org, Alexander Korotkov <akorotkov(at)postgresql(dot)org>
Subject: Re: BUG #18170: Unexpected error: no relation entry for relid 3
Date: 2023-10-30 06:24:01
Message-ID: CAMbWs48FTQtO=ARgjbHqz5fYtOhVUAbdEC1PpnMsjsaRsOENeQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Oct 30, 2023 at 10:47 AM Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2023-10-30 07:10:35 RE: Logical replication is missing block of rows when sending initial sync?
Previous Message Andrei Lepikhov 2023-10-30 02:47:32 Re: BUG #18170: Unexpected error: no relation entry for relid 3