Re: parallel.c is not marked as test covered

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>, Clément Prévost <prevostclement(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: parallel.c is not marked as test covered
Date: 2016-05-31 16:36:08
Message-ID: 92bec2a5-6d5b-6630-ce4d-2ed76f357973@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 5/9/16 10:50 AM, Andres Freund wrote:
> I think it's a good idea to run a force-parallel run on some buildfarm
> members. 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.

I can confirm that with force_parallel_mode = on, parallel.c does get
good test coverage. But I agree that it is a problem that this does not
happen in the default test setup.

I think we might want to have a new test file that sets
force_parallel_mode = on and just runs a few queries to give parallel.c
a small workout. For example, I find that the following test file gives
almost the same coverage as running the full test suite with f_p_m=on:

"""
SET force_parallel_mode = on;

EXPLAIN SELECT * FROM tenk1 WHERE unique1 = 1;
SELECT * FROM tenk1 WHERE unique1 = 1;

-- provoke error in worker
SELECT stringu1::int2 FROM tenk1;
"""

While we're at it, one of the things that force_parallel_mode = regress
does is remove an error context that is otherwise added to all messages:

errcontext("parallel worker, PID %d", *(int32 *) arg);

I think we should get rid of that error context altogether, except
possibly as a debugging tool, because it's an implementation detail that
does not need to be shown to users by default.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2016-05-31 16:38:53 Re: what to revert
Previous Message Tom Lane 2016-05-31 16:34:41 Re: [PATCH][Documination] Add optional USING keyword before opclass name in INSERT statemet