Consistently use "superuser" instead of "super user"
[pgsql.git] / src / test / regress / expected / write_parallel.out
blobdc0c4ba587e16b46b727e5912aa07092cbc0adc6
1 --
2 -- PARALLEL
3 --
4 begin;
5 -- encourage use of parallel plans
6 set parallel_setup_cost=0;
7 set parallel_tuple_cost=0;
8 set min_parallel_table_scan_size=0;
9 set max_parallel_workers_per_gather=4;
11 -- Test write operations that has an underlying query that is eligible
12 -- for parallel plans
14 explain (costs off) create table parallel_write as
15     select length(stringu1) from tenk1 group by length(stringu1);
16                     QUERY PLAN                     
17 ---------------------------------------------------
18  Finalize HashAggregate
19    Group Key: (length((stringu1)::text))
20    ->  Gather
21          Workers Planned: 4
22          ->  Partial HashAggregate
23                Group Key: length((stringu1)::text)
24                ->  Parallel Seq Scan on tenk1
25 (7 rows)
27 create table parallel_write as
28     select length(stringu1) from tenk1 group by length(stringu1);
29 drop table parallel_write;
30 explain (costs off) select length(stringu1) into parallel_write
31     from tenk1 group by length(stringu1);
32                     QUERY PLAN                     
33 ---------------------------------------------------
34  Finalize HashAggregate
35    Group Key: (length((stringu1)::text))
36    ->  Gather
37          Workers Planned: 4
38          ->  Partial HashAggregate
39                Group Key: length((stringu1)::text)
40                ->  Parallel Seq Scan on tenk1
41 (7 rows)
43 select length(stringu1) into parallel_write
44     from tenk1 group by length(stringu1);
45 drop table parallel_write;
46 explain (costs off) create materialized view parallel_mat_view as
47     select length(stringu1) from tenk1 group by length(stringu1);
48                     QUERY PLAN                     
49 ---------------------------------------------------
50  Finalize HashAggregate
51    Group Key: (length((stringu1)::text))
52    ->  Gather
53          Workers Planned: 4
54          ->  Partial HashAggregate
55                Group Key: length((stringu1)::text)
56                ->  Parallel Seq Scan on tenk1
57 (7 rows)
59 create materialized view parallel_mat_view as
60     select length(stringu1) from tenk1 group by length(stringu1);
61 create unique index on parallel_mat_view(length);
62 refresh materialized view parallel_mat_view;
63 refresh materialized view concurrently parallel_mat_view;
64 drop materialized view parallel_mat_view;
65 prepare prep_stmt as select length(stringu1) from tenk1 group by length(stringu1);
66 explain (costs off) create table parallel_write as execute prep_stmt;
67                     QUERY PLAN                     
68 ---------------------------------------------------
69  Finalize HashAggregate
70    Group Key: (length((stringu1)::text))
71    ->  Gather
72          Workers Planned: 4
73          ->  Partial HashAggregate
74                Group Key: length((stringu1)::text)
75                ->  Parallel Seq Scan on tenk1
76 (7 rows)
78 create table parallel_write as execute prep_stmt;
79 drop table parallel_write;
80 rollback;