Skip to content

Commit 0976c4d

Browse files
committed
Make new regression indpendent of max_parallel_workers_per_gather.
The tests in e2f1eb0 ("Implement partition-wise grouping/aggregation.") weren't independent of the server's max_parallel_workers_per_gather setting. I (Andres) find it useful to locally run with that disabled, and the aforementioned patch broke this. Author: Jeevan Chalke Discussion: https://postgr.es/m/20180322210703.qmga3vsxqmiiypci@alap3.anarazel.de https://postgr.es/m/CAM2+6=UNWGKTgh9aOn4=SQ72HfFzbVFseh9=5N54bD6KB+D9OQ@mail.gmail.com
1 parent 96b5eac commit 0976c4d

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/test/regress/expected/partition_aggregate.out

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
SET enable_partitionwise_aggregate TO true;
77
-- Enable partitionwise join, which by default is disabled.
88
SET enable_partitionwise_join TO true;
9+
-- Disable parallel plans.
10+
SET max_parallel_workers_per_gather TO 0;
911
--
1012
-- Tests for list partitioned tables.
1113
--
@@ -921,6 +923,8 @@ ALTER TABLE pagg_tab_ml_p3 ATTACH PARTITION pagg_tab_ml_p3_s1 FOR VALUES FROM (0
921923
ALTER TABLE pagg_tab_ml ATTACH PARTITION pagg_tab_ml_p3 FOR VALUES FROM (20) TO (30);
922924
INSERT INTO pagg_tab_ml SELECT i % 30, i % 10, to_char(i % 4, 'FM0000') FROM generate_series(0, 29999) i;
923925
ANALYZE pagg_tab_ml;
926+
-- For Parallel Append
927+
SET max_parallel_workers_per_gather TO 2;
924928
-- Full aggregation at level 1 as GROUP BY clause matches with PARTITION KEY
925929
-- for level 1 only. For subpartitions, GROUP BY clause does not match with
926930
-- PARTITION KEY, but still we do not see a partial aggregation as array_agg()
@@ -1146,7 +1150,6 @@ SELECT a, sum(b), count(*) FROM pagg_tab_ml GROUP BY a, b, c HAVING avg(b) > 7 O
11461150
(12 rows)
11471151

11481152
-- Parallelism within partitionwise aggregates
1149-
SET max_parallel_workers_per_gather TO 2;
11501153
SET min_parallel_table_scan_size TO '8kB';
11511154
SET parallel_setup_cost TO 0;
11521155
-- Full aggregation at level 1 as GROUP BY clause matches with PARTITION KEY

src/test/regress/sql/partition_aggregate.sql

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
SET enable_partitionwise_aggregate TO true;
88
-- Enable partitionwise join, which by default is disabled.
99
SET enable_partitionwise_join TO true;
10+
-- Disable parallel plans.
11+
SET max_parallel_workers_per_gather TO 0;
1012

1113
--
1214
-- Tests for list partitioned tables.
@@ -206,6 +208,9 @@ ALTER TABLE pagg_tab_ml ATTACH PARTITION pagg_tab_ml_p3 FOR VALUES FROM (20) TO
206208
INSERT INTO pagg_tab_ml SELECT i % 30, i % 10, to_char(i % 4, 'FM0000') FROM generate_series(0, 29999) i;
207209
ANALYZE pagg_tab_ml;
208210

211+
-- For Parallel Append
212+
SET max_parallel_workers_per_gather TO 2;
213+
209214
-- Full aggregation at level 1 as GROUP BY clause matches with PARTITION KEY
210215
-- for level 1 only. For subpartitions, GROUP BY clause does not match with
211216
-- PARTITION KEY, but still we do not see a partial aggregation as array_agg()
@@ -238,7 +243,6 @@ SELECT a, sum(b), count(*) FROM pagg_tab_ml GROUP BY a, b, c HAVING avg(b) > 7 O
238243

239244
-- Parallelism within partitionwise aggregates
240245

241-
SET max_parallel_workers_per_gather TO 2;
242246
SET min_parallel_table_scan_size TO '8kB';
243247
SET parallel_setup_cost TO 0;
244248

0 commit comments

Comments
 (0)