mirror of
https://github.com/postgres/postgres.git
synced 2026-02-03 20:40:14 -05:00
Exercise parallel GIN builds in regression tests
Modify two places creating GIN indexes in regression tests, so that the build is parallel. This provides a basic test coverage, even if the amounts of data are fairly small. Reported-by: Kirill Reshke <reshkekirill@gmail.com> Backpatch-through: 18 Discussion: https://postgr.es/m/CALdSSPjUprTj+vYp1tRKWkcLYzdy=N=O4Cn4y_HoxNSqQwBttg@mail.gmail.com
This commit is contained in:
parent
eee71a66cc
commit
32593394ee
4 changed files with 6 additions and 2 deletions
|
|
@ -3099,6 +3099,7 @@ SELECT count(*) FROM testjsonb WHERE j @? '$.bar';
|
|||
0
|
||||
(1 row)
|
||||
|
||||
ALTER TABLE testjsonb SET (parallel_workers = 2);
|
||||
CREATE INDEX jidx ON testjsonb USING gin (j);
|
||||
SET enable_seqscan = off;
|
||||
SELECT count(*) FROM testjsonb WHERE j @> '{"wait":null}';
|
||||
|
|
@ -3475,7 +3476,7 @@ SELECT count(*) FROM testjsonb WHERE j = '{"pos":98, "line":371, "node":"CBA", "
|
|||
|
||||
--gin path opclass
|
||||
DROP INDEX jidx;
|
||||
CREATE INDEX jidx ON testjsonb USING gin (j jsonb_path_ops);
|
||||
CREATE INDEX CONCURRENTLY jidx ON testjsonb USING gin (j jsonb_path_ops);
|
||||
SET enable_seqscan = off;
|
||||
SELECT count(*) FROM testjsonb WHERE j @> '{"wait":null}';
|
||||
count
|
||||
|
|
|
|||
|
|
@ -870,6 +870,7 @@ RESET enable_seqscan;
|
|||
RESET enable_indexscan;
|
||||
RESET enable_bitmapscan;
|
||||
DROP INDEX wowidx;
|
||||
ALTER TABLE test_tsvector SET (parallel_workers = 2);
|
||||
CREATE INDEX wowidx ON test_tsvector USING gin (a);
|
||||
SET enable_seqscan=OFF;
|
||||
-- GIN only supports bitmapscan, so no need to test plain indexscan
|
||||
|
|
|
|||
|
|
@ -851,6 +851,7 @@ SELECT count(*) FROM testjsonb WHERE j @? '$';
|
|||
SELECT count(*) FROM testjsonb WHERE j @? '$.public';
|
||||
SELECT count(*) FROM testjsonb WHERE j @? '$.bar';
|
||||
|
||||
ALTER TABLE testjsonb SET (parallel_workers = 2);
|
||||
CREATE INDEX jidx ON testjsonb USING gin (j);
|
||||
SET enable_seqscan = off;
|
||||
|
||||
|
|
@ -939,7 +940,7 @@ SELECT count(*) FROM testjsonb WHERE j = '{"pos":98, "line":371, "node":"CBA", "
|
|||
|
||||
--gin path opclass
|
||||
DROP INDEX jidx;
|
||||
CREATE INDEX jidx ON testjsonb USING gin (j jsonb_path_ops);
|
||||
CREATE INDEX CONCURRENTLY jidx ON testjsonb USING gin (j jsonb_path_ops);
|
||||
SET enable_seqscan = off;
|
||||
|
||||
SELECT count(*) FROM testjsonb WHERE j @> '{"wait":null}';
|
||||
|
|
|
|||
|
|
@ -222,6 +222,7 @@ RESET enable_bitmapscan;
|
|||
|
||||
DROP INDEX wowidx;
|
||||
|
||||
ALTER TABLE test_tsvector SET (parallel_workers = 2);
|
||||
CREATE INDEX wowidx ON test_tsvector USING gin (a);
|
||||
|
||||
SET enable_seqscan=OFF;
|
||||
|
|
|
|||
Loading…
Reference in a new issue