Re: parallel.c is not marked as test covered - Mailing list pgsql-hackers

From Tom Lane
Subject Re: parallel.c is not marked as test covered
Date
Msg-id 26842.1462941248@sss.pgh.pa.us
Whole thread Raw
In response to Re: parallel.c is not marked as test covered  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: parallel.c is not marked as test covered  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, May 9, 2016 at 11:11 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> regression=# set force_parallel_mode TO on;
>> SET
>> regression=# explain select count(*) from tenk1;
>> QUERY PLAN
>> -----------------------------------------------------------------
>> Aggregate  (cost=483.00..483.01 rows=1 width=8)
>> ->  Seq Scan on tenk1  (cost=0.00..458.00 rows=10000 width=0)
>> (2 rows)
>> 
>> Methinks force_parallel_mode is a bit broken.

> Hmm, that is strange.  I would have expected that to stuff a Gather on
> top of the Aggregate.  I wonder why it's not doing that.

The reason is that create_plain_partial_paths() contains a hard-wired
decision not to generate any partial paths for relations smaller than
1000 blocks, which means that no partial path will ever be generated
for *any* relation in the standard regression tests, force_parallel_mode
or no.

I would just go fix this, along the lines of

*************** create_plain_partial_paths(PlannerInfo *
*** 702,708 ****        * with all of its inheritance siblings it may well pay off.        */       if (rel->pages <
parallel_threshold&&
 
!           rel->reloptkind == RELOPT_BASEREL)           return;        /*
--- 703,710 ----        * with all of its inheritance siblings it may well pay off.        */       if (rel->pages <
parallel_threshold&&
 
!           rel->reloptkind == RELOPT_BASEREL &&
!           force_parallel_mode == FORCE_PARALLEL_OFF)           return;        /*

except that doing so and running the regression tests with
force_parallel_mode = on results in core dumps.  Some debugging seems
indicated ... and we should at this point assume that there has been no
useful testing of parallel query in the buildfarm, not even on Noah's
machines.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Stopping logical replication protocol
Next
From: Jim Nasby
Date:
Subject: Re: Reviewing freeze map code