Re: parallel explain analyze support not exercised

From: Andres Freund <andres(at)anarazel(dot)de>
To: Rafia Sabih <rafia(dot)sabih(at)enterprisedb(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: parallel explain analyze support not exercised
Date: 2017-04-03 17:53:48
Message-ID: 20170403175348.zt7r6tn5x5nxhf2u@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2017-04-03 10:26:27 +0530, Rafia Sabih wrote:
> On Sat, Apr 1, 2017 at 12:25 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> > Hi,
> >
> > As visible in [1], the explain analyze codepaths of parallel query isn't
> > exercised in the tests. That used to be not entirely trivial if the
> > output was to be displayed (due to timing), but we should be able to do
> > that now that we have the SUMMARY option.
> >
> > E.g.
> > SET max_parallel_workers = 0;
> > EXPLAIN (analyze, timing off, summary off, costs off) SELECT * FROM blarg2 WHERE generate_series < 0;
> > ┌───────────────────────────────────────────────────────────┐
> > │ QUERY PLAN │
> > ├───────────────────────────────────────────────────────────┤
> > │ Gather (actual rows=0 loops=1) │
> > │ Workers Planned: 10 │
> > │ Workers Launched: 0 │
> > │ -> Parallel Seq Scan on blarg2 (actual rows=0 loops=1) │
> > │ Filter: (generate_series < 0) │
> > │ Rows Removed by Filter: 10000000 │
> > └───────────────────────────────────────────────────────────┘
> >
> > should be reproducible. I'd suggest additionally adding one tests that
> > throws the EXPLAIN output away, but actually enables paralellism.
> >
> > Greetings,
> >
> > Andres Freund
> >
> > [1] https://coverage.postgresql.org/src/backend/executor/execParallel.c.gcov.html
>
> Please find the attached for the same.

> +-- to increase the parallel query test coverage
> +EXPLAIN (analyze, timing off, summary off, costs off) SELECT * FROM tenk1;
> + QUERY PLAN
> +-------------------------------------------------------------
> + Gather (actual rows=10000 loops=1)
> + Workers Planned: 4
> + Workers Launched: 4
> + -> Parallel Seq Scan on tenk1 (actual rows=2000 loops=5)
> +(4 rows)

Is there an issue that we might not actually be able to start all four
workers? Serious question, not rhetorical.

Regards,

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2017-04-03 17:54:24 Re: [BUGS] BUG #14600: Passwords in user mappings leaked by psql \deu+ command
Previous Message Andres Freund 2017-04-03 17:52:12 Re: parallel bitmapscan isn't exercised in regression tests