Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eMNN1-0008Nd-FZ for pgsql-committers@arkaria.postgresql.org; Wed, 06 Dec 2017 00:15:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eMNN0-0005cH-PC for pgsql-committers@arkaria.postgresql.org; Wed, 06 Dec 2017 00:15:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eMNN0-0005c7-Gh for pgsql-committers@lists.postgresql.org; Wed, 06 Dec 2017 00:15:26 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eMNMt-0006vu-NZ; Wed, 06 Dec 2017 00:15:25 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id vB60FIih017869; Tue, 5 Dec 2017 19:15:18 -0500 From: Tom Lane To: Robert Haas cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Support Parallel Append plan nodes. In-reply-to: References: Comments: In-reply-to Robert Haas message dated "Tue, 05 Dec 2017 22:31:22 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17867.1512519318.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 05 Dec 2017 19:15:18 -0500 Message-ID: <17868.1512519318@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > Support Parallel Append plan nodes. Buildfarm member sidewinder doesn't like this: Program terminated with signal SIGABRT, Aborted. #0 0x00007f7ff5b0e01a in _lwp_kill () from /usr/lib/libc.so.12 #0 0x00007f7ff5b0e01a in _lwp_kill () from /usr/lib/libc.so.12 #1 0x00007f7ff5b0dca5 in abort () from /usr/lib/libc.so.12 #2 0x000000000082b5e3 in ExceptionalCondition (conditionName=3DconditionN= ame@entry=3D0x9ad548 "!(append->first_partial_plan < node->as_nplans)", er= rorType=3DerrorType@entry=3D0x87489a "FailedAssertion", fileName=3DfileNam= e@entry=3D0x9ad4d6 "nodeAppend.c", lineNumber=3DlineNumber@entry=3D509) at= assert.c:54 #3 0x000000000060feb6 in choose_next_subplan_for_worker (node=3D0x7f7ff73= 57980) at nodeAppend.c:509 #4 0x000000000061007d in ExecAppend (pstate=3D0x7f7ff7357980) at nodeAppe= nd.c:222 #5 0x0000000000610464 in ExecProcNode (node=3D0x7f7ff7357980) at ../../..= /src/include/executor/executor.h:241 #6 fetch_input_tuple (aggstate=3Daggstate@entry=3D0x7f7ff7357a98) at node= Agg.c:699 #7 0x0000000000612531 in agg_retrieve_direct (aggstate=3D0x7f7ff7357a98) = at nodeAgg.c:2456 #8 ExecAgg (pstate=3D0x7f7ff7357a98) at nodeAgg.c:2166 #9 0x0000000000603cbd in ExecProcNode (node=3D0x7f7ff7357a98) at ../../..= /src/include/executor/executor.h:241 #10 ExecutePlan (execute_once=3D, dest=3D0x7f7ff73556b8, di= rection=3D, numberTuples=3D0, sendTuples=3D1 '\001', operat= ion=3DCMD_SELECT, use_parallel_mode=3D, planstate=3D0x7f7ff= 7357a98, estate=3D0x7f7ff7357040) at execMain.c:1718 #11 standard_ExecutorRun (queryDesc=3D0x7f7ff7369f58, direction=3D, count=3D0, execute_once=3D) at execMain.c:361 #12 0x000000000060833b in ParallelQueryMain (seg=3D0x7f7ff7b65908, toc=3D0= x7f7ff7fab000) at execParallel.c:1319 #13 0x00000000004f6e54 in ParallelWorkerMain (main_arg=3D) = at parallel.c:1150 #14 0x00000000006ba07f in StartBackgroundWorker () at bgworker.c:841 #15 0x00000000006c51f9 in do_start_bgworker (rw=3D) at post= master.c:5741 Append.first_partial_plan is sadly underdocumented, but considering that the loop above this Assert is prepared for the possibility that first_partial_plan >=3D node->as_nplans, I'm not sure why this code suppos= es that that can't happen. BTW, I find it confusing and bad style that some of the references in this function to node->as_pstate go through the local variable pstate but others do not. regards, tom lane