Re: BUG #18576: Using EXPLAIN (VERBOSE) in information_schema.element_types returns ERROR: failed to find plan for

From: Andrei Lepikhov <lepihov(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18576: Using EXPLAIN (VERBOSE) in information_schema.element_types returns ERROR: failed to find plan for
Date: 2024-08-19 11:23:51
Message-ID: 332f0e30-f90a-4e47-b668-b53f649c244f@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 9/8/2024 17:25, Tom Lane wrote:
> I wrote:
>> Richard Guo <guofenglinux(at)gmail(dot)com> writes:
>>> Agreed. Do you think it would be helpful to add some assertions to
>>> verify the plan type?
>
>> I thought about that but didn't experiment with it. I wonder whether
>> it'd just make the code more fragile. Still, it might be useful to
>> verify that things are happening as we expect.
>
> After sleeping on it, I elected to add the Asserts as suggested,
> except in v12 where they'd have had to look different. That's
> not strictly a matter of laziness: v12's next release will be its
> last, and I've been burned often enough to become very hesitant
> about pushing even slightly-questionable code into an EOL release.
Thanks for pushing this!

But could you change this code a little bit?
I reported this issue a year ago. At that time, it was triggered by the
CustomScan node [1]. I haven't found the solution there [2]. Your code
looks like a good tradeoff, and if you slightly change the code (like in
the attachment), it allows CustomScan to survive such cases.

[1]
https://www.postgresql.org/message-id/3933834e-b657-4ad1-bf4e-5f3fbba7ba14%40app.fastmail.com
[2]
https://www.postgresql.org/message-id/0cbbd87e-1b57-4b7e-9825-19a6fb2f8670%40postgrespro.ru

--
regards, Andrei Lepikhov

Attachment Content-Type Size
minor_fix.diff text/plain 1.2 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Gustafsson 2024-08-19 12:52:45 Re: TLS session tickets disabled?
Previous Message Sergey Sargsyan 2024-08-19 09:40:18 Re: BUG #18582: fixed range of search for empty slot in SLRU