Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6a1f082

Browse files
committed
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
1 parent be39d88 commit 6a1f082

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/test/regress/expected/gist.out

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ select p from gist_tbl order by circle(p,1) <-> point(0,0) limit 1;
387387

388388
select p from gist_tbl order by circle(p,1) <-> point(0,0) limit 1;
389389
ERROR: lossy distance functions are not supported in index-only scans
390+
-- Force an index build using buffering.
391+
create index gist_tbl_box_index_forcing_buffering on gist_tbl using gist (p)
392+
with (buffering=on, fillfactor=50);
390393
-- Clean up
391394
reset enable_seqscan;
392395
reset enable_bitmapscan;

src/test/regress/sql/gist.sql

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ explain (verbose, costs off)
169169
select p from gist_tbl order by circle(p,1) <-> point(0,0) limit 1;
170170
select p from gist_tbl order by circle(p,1) <-> point(0,0) limit 1;
171171

172+
-- Force an index build using buffering.
173+
create index gist_tbl_box_index_forcing_buffering on gist_tbl using gist (p)
174+
with (buffering=on, fillfactor=50);
175+
172176
-- Clean up
173177
reset enable_seqscan;
174178
reset enable_bitmapscan;

0 commit comments

Comments
 (0)