Skip to content

Commit

Permalink
Set max_parallel_workers_per_gather manually on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
za-arthur committed Jul 13, 2023
1 parent 4ea83f6 commit 30b2777
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ ifeq ($(shell test $(VERSION_NUM) -lt 100000; echo $$?),0)
REGRESS := $(filter-out parallel, $(REGRESS))
endif

ifeq ($(shell test $(VERSION_NUM) -ge 90600; echo $$?),0)
PGOPTIONS+= "--max_parallel_workers_per_gather=0"
endif


PLATFORM = $(shell uname -s)

Expand All @@ -53,9 +49,6 @@ all: $(EXTENSION)--$(EXTVERSION).sql
$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
cp $< $@

installcheck: submake $(REGRESS_PREP)
PGOPTIONS=$(PGOPTIONS) $(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)

prep_kafka:
./test/init_kafka.sh

Expand Down
1 change: 1 addition & 0 deletions test/expected/kafka_test.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\i test/sql/setup.inc
\set ECHO none
SET max_parallel_workers_per_gather = 0;
/*
* Returns EXPLAIN ANALYZE result without any arbitrary numbers like costs
* or execution time.
Expand Down
2 changes: 2 additions & 0 deletions test/expected/parallel.out
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ALTER FOREIGN TABLE kafka_test_part OPTIONS(ADD num_partitions '4');
set max_parallel_workers_per_gather=2;
set max_parallel_workers=8;
set parallel_setup_cost=0;
set parallel_tuple_cost=0;
set min_parallel_table_scan_size=0;
ANALYZE kafka_test_part;
EXPLAIN (COSTS OFF) SELECT * FROM kafka_test_part ;
QUERY PLAN
Expand Down
2 changes: 2 additions & 0 deletions test/sql/kafka_test.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
\i test/sql/setup.inc

SET max_parallel_workers_per_gather = 0;

/*
* Returns EXPLAIN ANALYZE result without any arbitrary numbers like costs
* or execution time.
Expand Down
2 changes: 2 additions & 0 deletions test/sql/parallel.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ ALTER FOREIGN TABLE kafka_test_part OPTIONS(ADD num_partitions '4');
set max_parallel_workers_per_gather=2;
set max_parallel_workers=8;
set parallel_setup_cost=0;
set parallel_tuple_cost=0;
set min_parallel_table_scan_size=0;

ANALYZE kafka_test_part;
EXPLAIN (COSTS OFF) SELECT * FROM kafka_test_part ;
Expand Down

0 comments on commit 30b2777

Please sign in to comment.