Fix tests output for Postgres 9.6, 10

This commit is contained in:
Artur Zakirov
2022-07-13 10:48:15 +02:00
parent c72f409426
commit 7d60ebb68f
2 changed files with 62 additions and 1 deletions

4
.gitignore vendored
View File

@@ -1,3 +1,6 @@
# Tests outpout
results/
# Object files
*.o
*.ko
@@ -22,7 +25,6 @@
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64

View File

@@ -0,0 +1,59 @@
BEGIN;
create extension base36;
SET max_parallel_workers_per_gather=4;
SET force_parallel_mode=on;
CREATE TABLE parallel_test(i int, b1 base36, b2 bigbase36) WITH (parallel_workers = 4);
INSERT INTO parallel_test (i, b1, b2)
SELECT i, i::int, i::bigint
FROM generate_series(1,1e6) i;
EXPLAIN (costs off,verbose)
SELECT COUNT(*) FROM parallel_test WHERE b1 = '1ftese';
QUERY PLAN
-------------------------------------------------------------------
Finalize Aggregate
Output: count(*)
-> Gather
Output: (PARTIAL count(*))
Workers Planned: 4
-> Partial Aggregate
Output: PARTIAL count(*)
-> Parallel Seq Scan on public.parallel_test
Filter: (parallel_test.b1 = '1ftese'::base36)
(9 rows)
EXPLAIN (costs off,verbose)
SELECT COUNT(*) FROM parallel_test WHERE b2 = '1ftese';
QUERY PLAN
----------------------------------------------------------------------
Finalize Aggregate
Output: count(*)
-> Gather
Output: (PARTIAL count(*))
Workers Planned: 4
-> Partial Aggregate
Output: PARTIAL count(*)
-> Parallel Seq Scan on public.parallel_test
Filter: (parallel_test.b2 = '1ftese'::bigbase36)
(9 rows)
EXPLAIN (costs off,verbose)
SELECT b1, COUNT(*) FROM parallel_test GROUP BY 1;
QUERY PLAN
-------------------------------------------------------------------
Finalize GroupAggregate
Output: b1, count(*)
Group Key: parallel_test.b1
-> Sort
Output: b1, (PARTIAL count(*))
Sort Key: parallel_test.b1
-> Gather
Output: b1, (PARTIAL count(*))
Workers Planned: 4
-> Partial HashAggregate
Output: b1, PARTIAL count(*)
Group Key: parallel_test.b1
-> Parallel Seq Scan on public.parallel_test
Output: b1
(14 rows)
ROLLBACK;