Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf8a1c1d

Browse files
committed
Make GIN regression test stable.
Commit7f46eaf added the regression test which checks thatgin_clean_pending_list() cleans up the GIN pending list and returns >0.This usually works fine. But if autovacuum comes along and cleansthe list before gin_clean_pending_list() starts, the function mayreturn 0, and then the regression test may fail.To fix the problem, this commit disables autovacuum on the targetindex of gin_clean_pending_list() by setting autovacuum_enabledreloption to off when creating the table.Also this commit sets gin_pending_list_limit reloption to 4MB onthe target index. Otherwise when running "make installcheck" withsmall gin_pending_list_limit GUC, insertions of data may triggerthe cleanup of pending list before gin_clean_pending_list() startsand the function may return 0. This could cause the regression testto fail.Per buildfarm member spoonbill.Reported-By: Tom Lane
1 parenta6897ef commitf8a1c1d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

‎src/test/regress/expected/gin.out

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
-- There are other tests to test different GIN opclassed. This is for testing
55
-- GIN itself.
66
-- Create and populate a test table with a GIN index.
7-
create table gin_test_tbl(i int4[]);
8-
create index gin_test_idx on gin_test_tbl using gin (i) with (fastupdate = on);
7+
create table gin_test_tbl(i int4[]) with (autovacuum_enabled = off);
8+
create index gin_test_idx on gin_test_tbl using gin (i)
9+
with (fastupdate = on, gin_pending_list_limit = 4096);
910
insert into gin_test_tbl select array[1, 2, g] from generate_series(1, 20000) g;
1011
insert into gin_test_tbl select array[1, 3, g] from generate_series(1, 1000) g;
1112
select gin_clean_pending_list('gin_test_idx')>10 as many; -- flush the fastupdate buffers

‎src/test/regress/sql/gin.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
-- GIN itself.
66

77
-- Create and populate a test table with a GIN index.
8-
createtablegin_test_tbl(i int4[]);
9-
createindexgin_test_idxon gin_test_tbl using gin (i) with (fastupdate=on);
8+
createtablegin_test_tbl(i int4[]) with (autovacuum_enabled= off);
9+
createindexgin_test_idxon gin_test_tbl using gin (i)
10+
with (fastupdate=on, gin_pending_list_limit=4096);
1011
insert into gin_test_tblselect array[1,2, g]from generate_series(1,20000) g;
1112
insert into gin_test_tblselect array[1,3, g]from generate_series(1,1000) g;
1213

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp