Re: server crashed with TRAP: FailedAssertion("!(!parallel_aware || pathnode->path.parallel_safe)"

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, amul sul <sulamul(at)gmail(dot)com>
Subject: Re: server crashed with TRAP: FailedAssertion("!(!parallel_aware || pathnode->path.parallel_safe)"
Date: 2018-06-16 14:00:28
Message-ID: CAA4eK1+PBv3naOrwBiyX6-FaS+UqUpoe2GB+-VR1NPU6mkBm_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 16, 2018 at 10:44 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Thu, Jun 14, 2018 at 9:54 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com> writes:
>>> I am getting a server crash for below test case.
>>
>>> postgres=# select (select max((select t1.c2 from test t1 where t1.c1 =
>>> t2.c1))) from test t2;
>>> server closed the connection unexpectedly
>>
>> Reproduced here. The assert seems to be happening because
>> add_paths_to_append_rel is trying to create a parallel path for
>> an appendrel that is marked consider_parallel = false.
>>
>> This appears to be the fault of commit ab7271677, whose authors I've cc'd:
>> the stanza starting at about allpaths.c:1672 is bullheadedly creating a
>> parallel path whether that's allowed or not. Fixing it might be as simple
>> as adding "rel->consider_parallel" to the conditions there.
>>
>
> Yeah, or perhaps disallow creation of any partial paths at the first
> place like in attached. This will save us some work as well.
>

Attached patch contains test case as well. I have tried to come up
with some simple test, but couldn't come up with anything much simpler
than reported by Rajkumar, so decided to use the test case provided by
him.

Added to Open Items list.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
fix_pa_path_generation_v2.patch application/octet-stream 3.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Dent 2018-06-16 14:21:27 Query Rewrite for Materialized Views (Postgres Extension)
Previous Message Stephen Frost 2018-06-16 13:20:29 Re: WAL prefetch