Re: Parallel Seq Scan

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Kouhei Kaigai <kaigai(at)ak(dot)jp(dot)nec(dot)com>, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>, Jeff Davis <pgsql(at)j-davis(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, Fabrízio Mello <fabriziomello(at)gmail(dot)com>, Thom Brown <thom(at)linux(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel Seq Scan
Date: 2015-09-17 00:59:02
Message-ID: CAJrrPGdPAy=Rz4g969K7GdxWZn223yA_Q=URzNhidPfs2bMBnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 17, 2015 at 6:10 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, Sep 10, 2015 at 12:12 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>>> 2. I think it's probably a good idea - at least for now, and maybe
>>> forever - to avoid nesting parallel plans inside of other parallel
>>> plans. It's hard to imagine that being a win in a case like this, and
>>> it certainly adds a lot more cases to think about.
>>
>> I also think that avoiding nested parallel plans is a good step forward.
>
> Doing that as a part of the assess parallel safety patch was trivial, so I did.
>

I tried with latest HEAD code, seems to be problem is present in other
scenarios.

postgres=# explain select * from tbl a where exists (select 1 from tbl
b where a.f1=b.f1 limit 0);
QUERY PLAN
--------------------------------------------------------------------------------------
Funnel on tbl a (cost=0.00..397728310227.27 rows=5000000 width=214)
Filter: (SubPlan 1)
Number of Workers: 10
-> Partial Seq Scan on tbl a (cost=0.00..397727310227.27
rows=5000000 width=214)
Filter: (SubPlan 1)
SubPlan 1
-> Limit (cost=0.00..437500.00 rows=1 width=0)
-> Seq Scan on tbl b (cost=0.00..437500.00 rows=1 width=0)
Filter: (a.f1 = f1)
SubPlan 1
-> Limit (cost=0.00..437500.00 rows=1 width=0)
-> Seq Scan on tbl b (cost=0.00..437500.00 rows=1 width=0)
Filter: (a.f1 = f1)
(13 rows)

postgres=# explain analyze select * from tbl a where exists (select 1
from tbl b where a.f1=b.f1 limit 0);
ERROR: badly formatted node string "SUBPLAN :subLinkType 0 :testexpr"...
LOG: worker process: parallel worker for PID 8775 (PID 9121) exited
with exit code 1
ERROR: badly formatted node string "SUBPLAN :subLinkType 0 :testexpr"...
ERROR: badly formatted node string "SUBPLAN :subLinkType 0 :testexpr"...
LOG: worker process: parallel worker for PID 8775 (PID 9116) exited
with exit code 1
LOG: worker process: parallel worker for PID 8775 (PID 9119) exited
with exit code 1
ERROR: badly formatted node string "SUBPLAN :subLinkType 0 :testexpr"...
ERROR: badly formatted node string "SUBPLAN :subLinkType 0 :testexpr"...
LOG: worker process: parallel worker for PID 8775 (PID 9117) exited
with exit code 1
LOG: worker process: parallel worker for PID 8775 (PID 9114) exited
with exit code 1
ERROR: badly formatted node string "SUBPLAN :subLinkType 0 :testexpr"...
ERROR: badly formatted node string "SUBPLAN :subLinkType 0 :testexpr"...
LOG: worker process: parallel worker for PID 8775 (PID 9118) exited
with exit code 1
ERROR: badly formatted node string "SUBPLAN :subLinkType 0 :testexpr"...
ERROR: badly formatted node string "SUBPLAN :subLinkType 0 :testexpr"...
CONTEXT: parallel worker, pid 9115
STATEMENT: explain analyze select * from tbl a where exists (select 1
from tbl b where a.f1=b.f1 limit 0);
LOG: worker process: parallel worker for PID 8775 (PID 9115) exited
with exit code 1
LOG: worker process: parallel worker for PID 8775 (PID 9120) exited
with exit code 1
ERROR: badly formatted node string "SUBPLAN :subLinkType 0 :testexpr"...
CONTEXT: parallel worker, pid 9115

Regards,
Hari Babu
Fujitsu Australia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-09-17 01:18:17 Re: Parallel Seq Scan
Previous Message Thomas Munro 2015-09-16 23:02:27 Re: synchronous_commit = apply