pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: parallel.c is not marked as test covered
Date: Mon, 09 May 2016 11:11:24 -0400
Message-ID: <16867.1462806684@sss.pgh.pa.us> (raw)
In-Reply-To: <20160509145023.tkdpyygfxu56ngzz@alap3.anarazel.de>
References: <CAKJS1f-3evRXNfTh7GLFGfCkXhxOs0G5PJ_JQ7EbJYnsgK61yw@mail.gmail.com>
	<20160509012055.GA433959@alvherre.pgsql>
	<20160509145023.tkdpyygfxu56ngzz@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Andres Freund <andres@anarazel.de> writes:
> I think it's a good idea to run a force-parallel run on some buildfarm
> members.

Noah's already doing that on at least one of his critters.  But some more
wouldn't hurt.

> But I'm rather convinced that the core tests run by all animals
> need some minimal coverage of parallel queries. Both because otherwise
> it'll be hard to get some coverage of unusual platforms, and because
> it's imo something rather relevant to test during development.

+1.  Experimenting with what we might do, it seems like it's harder to get
the planner to use a parallel plan than you would think.

regression=# explain select count(*) from tenk1;
                                            QUERY PLAN                          
                   
--------------------------------------------------------------------------------
-------------------
 Aggregate  (cost=295.29..295.30 rows=1 width=8)
   ->  Index Only Scan using tenk1_thous_tenthous on tenk1  (cost=0.29..270.29 r
ows=10000 width=0)
(2 rows)

regression=# set enable_indexscan TO 0;
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)

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.

Also, once you *do* get it to make a parallel plan:

regression=# create table foo as select generate_series(1,1000000) g;
SELECT 1000000
regression=# analyze foo;
ANALYZE
regression=# explain select count(*) from foo;
                                      QUERY PLAN                                      
--------------------------------------------------------------------------------------
 Finalize Aggregate  (cost=10633.55..10633.56 rows=1 width=8)
   ->  Gather  (cost=10633.33..10633.54 rows=2 width=8)
         Workers Planned: 2
         ->  Partial Aggregate  (cost=9633.33..9633.34 rows=1 width=8)
               ->  Parallel Seq Scan on foo  (cost=0.00..8591.67 rows=416667 width=0)
(5 rows)

regression=# explain (costs off) select count(*) from foo;
                 QUERY PLAN                 
--------------------------------------------
 Finalize Aggregate
   ->  Gather
         Workers Planned: 2
         ->  Partial Aggregate
               ->  Parallel Seq Scan on foo
(5 rows)

That's not going to do for a regression-test case because it will break
anytime somebody changes the value of max_parallel_degree.  Maybe we
should suppress the "Workers Planned" field in costs-off display mode?

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (71+ messages)  latest in thread

Message-ID: <16867.1462806684@sss.pgh.pa.us>
Permalink:  ../16867.1462806684@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16867.1462806684@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, robertmhaas@gmail.com
  Subject: Re: parallel.c is not marked as test covered
  In-Reply-To: <16867.1462806684@sss.pgh.pa.us>
  References: <CAKJS1f-3evRXNfTh7GLFGfCkXhxOs0G5PJ_JQ7EbJYnsgK61yw@mail.gmail.com> <20160509012055.GA433959@alvherre.pgsql> <20160509145023.tkdpyygfxu56ngzz@alap3.anarazel.de> <16867.1462806684@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox