diff options
| author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2017-10-19 14:14:18 +0200 |
|---|---|---|
| committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2017-10-19 14:22:05 +0200 |
| commit | 4b95cc1dc36c9d1971f757e9b519fcc442833f0e (patch) | |
| tree | cf9504c4b963151d33e8b5c0e2b00682b0e389f3 /src/test/regress/sql/gist.sql | |
| parent | 752871b6de9b4c7d2c685a059adb55887e169201 (diff) | |
Add more tests for reloptions
This is preparation for a future patch to extensively change how
reloptions work.
Author: Nikolay Shaplov
Reviewed-by: Michael Paquier
Discussion: https://postgr.es/m/2615372.orqtEn8VGB@x200m
Diffstat (limited to 'src/test/regress/sql/gist.sql')
| -rw-r--r-- | src/test/regress/sql/gist.sql | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/regress/sql/gist.sql b/src/test/regress/sql/gist.sql index 49126fd466d..bae722fe13c 100644 --- a/src/test/regress/sql/gist.sql +++ b/src/test/regress/sql/gist.sql @@ -7,6 +7,17 @@ create table gist_point_tbl(id int4, p point); create index gist_pointidx on gist_point_tbl using gist(p); +-- Verify the fillfactor and buffering options +create index gist_pointidx2 on gist_point_tbl using gist(p) with (buffering = on, fillfactor=50); +create index gist_pointidx3 on gist_point_tbl using gist(p) with (buffering = off); +create index gist_pointidx4 on gist_point_tbl using gist(p) with (buffering = auto); +drop index gist_pointidx2, gist_pointidx3, gist_pointidx4; + +-- Make sure bad values are refused +create index gist_pointidx5 on gist_point_tbl using gist(p) with (buffering = invalid_value); +create index gist_pointidx5 on gist_point_tbl using gist(p) with (fillfactor=9); +create index gist_pointidx5 on gist_point_tbl using gist(p) with (fillfactor=101); + -- Insert enough data to create a tree that's a couple of levels deep. insert into gist_point_tbl (id, p) select g, point(g*10, g*10) from generate_series(1, 10000) g; @@ -24,6 +35,9 @@ delete from gist_point_tbl where id < 10000; vacuum analyze gist_point_tbl; +-- rebuild the index with a different fillfactor +alter index gist_pointidx SET (fillfactor = 40); +reindex index gist_pointidx; -- -- Test Index-only plans on GiST indexes |
