Skip to content

Commit

Permalink
Add minimal test for EXPLAIN ANALYZE of parallel query.
Browse files Browse the repository at this point in the history
This displays the number of workers launched, thus the test is
dependant on configuration to some degree.  We'll see whether that
turns out ot be a problem.

Author: Rafia Sabih
Discussion: https://postgr.es/m/[email protected]
  • Loading branch information
anarazel committed Apr 6, 2017
1 parent 5a59315 commit b2ff37d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/regress/expected/select_parallel.out
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,16 @@ explain (costs off)
Index Cond: (unique1 = 1)
(5 rows)

-- 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)

-- provoke error in worker
select stringu1::int2 from tenk1 where unique1 = 1;
ERROR: invalid input syntax for integer: "BAAAAA"
Expand Down
3 changes: 3 additions & 0 deletions src/test/regress/sql/select_parallel.sql
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ set force_parallel_mode=1;
explain (costs off)
select stringu1::int2 from tenk1 where unique1 = 1;

-- to increase the parallel query test coverage
EXPLAIN (analyze, timing off, summary off, costs off) SELECT * FROM tenk1;

-- provoke error in worker
select stringu1::int2 from tenk1 where unique1 = 1;

Expand Down

0 comments on commit b2ff37d

Please sign in to comment.