Re: Defer selection of asynchronous subplans until the executor initialization stage - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: Defer selection of asynchronous subplans until the executor initialization stage
Date
Msg-id CAPmGK17ZgFna1ZfLiT6Xm0wtoikPb9YTBvHpEiVVv8Ea6J9mUg@mail.gmail.com
Whole thread Raw
In response to Re: Defer selection of asynchronous subplans until the executor initialization stage  (Zhihong Yu <zyu@yugabyte.com>)
List pgsql-hackers
Hi,

On Sat, Apr 9, 2022 at 1:24 AM Zhihong Yu <zyu@yugabyte.com> wrote:
> On Fri, Apr 8, 2022 at 5:43 AM Justin Pryzby <pryzby@telsasoft.com> wrote:
>> This patch seems to be causing the planner to crash.
>> Here's a query reduced from sqlsmith.
>>
>> | explain SELECT 1 FROM information_schema.constraint_column_usage WHERE 1 <= pg_trigger_depth();
>>
>> Program terminated with signal SIGSEGV, Segmentation fault.

> I logged the value of plan->scanstatus before the assertion :
>
> 2022-04-08 16:20:59.601 UTC [26325] LOG:  scan status 0
> 2022-04-08 16:20:59.601 UTC [26325] STATEMENT:  explain SELECT 1 FROM information_schema.constraint_column_usage
WHERE1 <= pg_trigger_depth();
 
> 2022-04-08 16:20:59.796 UTC [26296] LOG:  server process (PID 26325) was terminated by signal 11: Segmentation fault
>
> It seems its value was SUBQUERY_SCAN_UNKNOWN.
>
> Still trying to find out the cause for the crash.

I think the cause is an oversight in mark_async_capable_plan().  See [1].

Thanks!

Best regards,
Etsuro Fujita

[1] https://www.postgresql.org/message-id/CAPmGK15NkuaVo0Fu_0TfoCpPPJaJi4OMLzEQtkE6Bt6YT52fPQ%40mail.gmail.com



pgsql-hackers by date:

Previous
From: Etsuro Fujita
Date:
Subject: Re: Defer selection of asynchronous subplans until the executor initialization stage
Next
From: Andrew Dunstan
Date:
Subject: Re: Can we automatically add elapsed times to tap test log?