Re: parallel.c is not marked as test covered

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: parallel.c is not marked as test covered
Date: 2016-05-11 04:34:08
Message-ID: 26842.1462941248@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Mon, May 9, 2016 at 11:11 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2016-05-11 04:38:01 Re: Reviewing freeze map code
Previous Message Craig Ringer 2016-05-11 04:25:26 Re: Stopping logical replication protocol