Commit b2ff37d4 authored by Andres Freund's avatar Andres Freund

Add minimal test for EXPLAIN ANALYZE of parallel query.

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/20170331185540.zmsue4ndvqtnayqw@alap3.anarazel.de
parent 5a593153
...@@ -280,6 +280,16 @@ explain (costs off) ...@@ -280,6 +280,16 @@ explain (costs off)
Index Cond: (unique1 = 1) Index Cond: (unique1 = 1)
(5 rows) (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 -- provoke error in worker
select stringu1::int2 from tenk1 where unique1 = 1; select stringu1::int2 from tenk1 where unique1 = 1;
ERROR: invalid input syntax for integer: "BAAAAA" ERROR: invalid input syntax for integer: "BAAAAA"
......
...@@ -116,6 +116,9 @@ set force_parallel_mode=1; ...@@ -116,6 +116,9 @@ set force_parallel_mode=1;
explain (costs off) explain (costs off)
select stringu1::int2 from tenk1 where unique1 = 1; 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 -- provoke error in worker
select stringu1::int2 from tenk1 where unique1 = 1; select stringu1::int2 from tenk1 where unique1 = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment