Re: Defer selection of asynchronous subplans until the executor initialization stage

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>, "Andrey V(dot) Lepikhov" <a(dot)lepikhov(at)postgrespro(dot)ru>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Defer selection of asynchronous subplans until the executor initialization stage
Date: 2022-04-10 10:58:30
Message-ID: CAPmGK17ZgFna1ZfLiT6Xm0wtoikPb9YTBvHpEiVVv8Ea6J9mUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Sat, Apr 9, 2022 at 1:24 AM Zhihong Yu <zyu(at)yugabyte(dot)com> wrote:
> On Fri, Apr 8, 2022 at 5:43 AM Justin Pryzby <pryzby(at)telsasoft(dot)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 WHERE 1 <= 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2022-04-10 13:23:16 Re: Can we automatically add elapsed times to tap test log?
Previous Message Etsuro Fujita 2022-04-10 10:43:48 Re: Defer selection of asynchronous subplans until the executor initialization stage