diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2022-07-30 16:22:24 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2022-07-30 16:22:24 -0400 |
commit | 6a1f082abac9da756d473e16238a906ca5a592dc (patch) | |
tree | 0ccc2326c17c3a23cfa06416264c44e77ca14348 /src/test | |
parent | be39d88934331c47c43d8c51500305e928f06240 (diff) | |
download | postgresql-6a1f082abac9da756d473e16238a906ca5a592dc.tar.gz |
Improve regression test coverage of GiST index building.
Add a test case that exercises the "buffering build" code path.
This covers almost all the non-error-case lines in gistbuild.c
and gistbuildbuffers.c.
Matheus Alcantara, based on earlier work by Pavel Borisov
Discussion: https://postgr.es/m/3z8Fde-IHbW57a7bEZtaf19f4YOCWu67IZoWJoGW18rKD9R16ZHHchf4d7KFI3Yg7-0N4NonFuwKEgh98HjMCZYoVx7KOioPo6Wn2nZRpf4=@pm.me
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/regress/expected/gist.out | 3 | ||||
-rw-r--r-- | src/test/regress/sql/gist.sql | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/test/regress/expected/gist.out b/src/test/regress/expected/gist.out index a36b4c9c56..822000cca7 100644 --- a/src/test/regress/expected/gist.out +++ b/src/test/regress/expected/gist.out @@ -387,6 +387,9 @@ select p from gist_tbl order by circle(p,1) <-> point(0,0) limit 1; select p from gist_tbl order by circle(p,1) <-> point(0,0) limit 1; ERROR: lossy distance functions are not supported in index-only scans +-- Force an index build using buffering. +create index gist_tbl_box_index_forcing_buffering on gist_tbl using gist (p) + with (buffering=on, fillfactor=50); -- Clean up reset enable_seqscan; reset enable_bitmapscan; diff --git a/src/test/regress/sql/gist.sql b/src/test/regress/sql/gist.sql index 3360266370..77a51bd6b3 100644 --- a/src/test/regress/sql/gist.sql +++ b/src/test/regress/sql/gist.sql @@ -169,6 +169,10 @@ explain (verbose, costs off) select p from gist_tbl order by circle(p,1) <-> point(0,0) limit 1; select p from gist_tbl order by circle(p,1) <-> point(0,0) limit 1; +-- Force an index build using buffering. +create index gist_tbl_box_index_forcing_buffering on gist_tbl using gist (p) + with (buffering=on, fillfactor=50); + -- Clean up reset enable_seqscan; reset enable_bitmapscan; |