diff options
author | Tomas Vondra | 2017-05-07 15:25:59 +0000 |
---|---|---|
committer | Tomas Vondra | 2017-05-07 15:25:59 +0000 |
commit | 7cc854fc9ddc632259919ae935db0a91bb0dd167 (patch) | |
tree | 7ac5104b8b2ebd13a36adf4689b38387828b5437 | |
parent | 55cdd4203891b489d857948b6422f20bf8ee165b (diff) |
Resolve failures in the gin regression test suite
The failures were due to running gin_clean_pending_list() being executed
on the coordinator only. As there are no data stored on the coordinator,
the pending list is always empty, the function can't clean anything and
so just returns 0. So the condition (r>10) was always false.
Resolved by using EXECUTE DIRECTO to run the function on both datanodes.
It would be nice if we could do this automatically for such maintenance
functions, but we don't have that capability at this point. So explicit
EXECUTE DIRECT seems like the right solution.
-rw-r--r-- | src/test/regress/expected/gin.out | 9 | ||||
-rw-r--r-- | src/test/regress/sql/gin.sql | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/test/regress/expected/gin.out b/src/test/regress/expected/gin.out index a3911a6c6c..904fbc8269 100644 --- a/src/test/regress/expected/gin.out +++ b/src/test/regress/expected/gin.out @@ -9,7 +9,14 @@ create index gin_test_idx on gin_test_tbl using gin (i) with (fastupdate = on, gin_pending_list_limit = 4096); insert into gin_test_tbl select array[1, 2, g] from generate_series(1, 20000) g; insert into gin_test_tbl select array[1, 3, g] from generate_series(1, 1000) g; -select gin_clean_pending_list('gin_test_idx')>10 as many; -- flush the fastupdate buffers +-- flush the fastupdate buffers (in XL we have to push that do datanodes) +execute direct on (datanode_1) 'select gin_clean_pending_list(''gin_test_idx'')>10 as many'; + many +------ + t +(1 row) + +execute direct on (datanode_2) 'select gin_clean_pending_list(''gin_test_idx'')>10 as many'; many ------ t diff --git a/src/test/regress/sql/gin.sql b/src/test/regress/sql/gin.sql index c566e9b58c..1dbbb4a251 100644 --- a/src/test/regress/sql/gin.sql +++ b/src/test/regress/sql/gin.sql @@ -11,7 +11,9 @@ create index gin_test_idx on gin_test_tbl using gin (i) insert into gin_test_tbl select array[1, 2, g] from generate_series(1, 20000) g; insert into gin_test_tbl select array[1, 3, g] from generate_series(1, 1000) g; -select gin_clean_pending_list('gin_test_idx')>10 as many; -- flush the fastupdate buffers +-- flush the fastupdate buffers (in XL we have to push that do datanodes) +execute direct on (datanode_1) 'select gin_clean_pending_list(''gin_test_idx'')>10 as many'; +execute direct on (datanode_2) 'select gin_clean_pending_list(''gin_test_idx'')>10 as many'; insert into gin_test_tbl select array[3, 1, g] from generate_series(1, 1000) g; |