mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-15 02:46:59 +08: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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user