Cover brin/gin/gist/spgist ambuildempty routines in regression tests
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 25 Apr 2022 13:00:49 +0000 (15:00 +0200)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 25 Apr 2022 13:00:49 +0000 (15:00 +0200)
Changing some TEMP or permanent tables to UNLOGGED is sufficient to
invoke these ambuildempty routines, which were all not uncovered by any
tests.  These changes do not otherwise affect the test suite.

Author: Amul Sul <sulamul@gmail.com>
Discussion: https://postgr.es/m/CAAJ_b95nneRCLM-=qELEdgCYSk6W_++-C+Q_t+wH3SW-hF50iw@mail.gmail.com

src/test/regress/expected/brin.out
src/test/regress/expected/gin.out
src/test/regress/expected/gist.out
src/test/regress/expected/spgist.out
src/test/regress/sql/brin.sql
src/test/regress/sql/gin.sql
src/test/regress/sql/gist.sql
src/test/regress/sql/spgist.sql

index ed7879f58310a8832b3d7519a290a827828d00ad..96cbb5de4ef936b62ea8ba479310877e80e249c1 100644 (file)
@@ -484,7 +484,7 @@ ERROR:  block number out of range: -1
 SELECT brin_summarize_range('brin_summarize_idx', 4294967296);
 ERROR:  block number out of range: 4294967296
 -- test value merging in add_value
-CREATE TABLE brintest_2 (n numrange);
+CREATE UNLOGGED TABLE brintest_2 (n numrange);
 CREATE INDEX brinidx_2 ON brintest_2 USING brin (n);
 INSERT INTO brintest_2 VALUES ('empty');
 INSERT INTO brintest_2 VALUES (numrange(0, 2^1000::numeric));
index 6402e89c7ff15a099cd6f7e587cc686af743cef1..1a0c3c6167fad4cfa93765fa287372e949962166 100644 (file)
@@ -74,7 +74,7 @@ select count(*) > 0 as ok from gin_test_tbl where i @> array[1];
 
 reset gin_fuzzy_search_limit;
 -- Test optimization of empty queries
-create temp table t_gin_test_tbl(i int4[], j int4[]);
+create unlogged table t_gin_test_tbl(i int4[], j int4[]);
 create index on t_gin_test_tbl using gin (i, j);
 insert into t_gin_test_tbl
 values
index 2393132ed67bf2e2feb7f28180e5cb2ab4dd94de..a36b4c9c5616db83516c965b2fe5d02fb9b8753d 100644 (file)
@@ -36,7 +36,7 @@ reindex index gist_pointidx;
 --
 -- Test Index-only plans on GiST indexes
 --
-create table gist_tbl (b box, p point, c circle);
+create unlogged table gist_tbl (b box, p point, c circle);
 insert into gist_tbl
 select box(point(0.05*i, 0.05*i), point(0.05*i, 0.05*i)),
        point(0.05*i, 0.05*i),
index 1688e0e0a3215f0a390f9451dc8d8b96ff369731..51bb9a95c5cc9c75c1b6490267a6ca3c6e561f58 100644 (file)
@@ -26,7 +26,7 @@ vacuum spgist_point_tbl;
 -- Test rescan paths (cf. bug #15378)
 -- use box and && rather than point, so that rescan happens when the
 -- traverse stack is non-empty
-create table spgist_box_tbl(id serial, b box);
+create unlogged table spgist_box_tbl(id serial, b box);
 insert into spgist_box_tbl(b)
 select box(point(i,j),point(i+s,j+s))
   from generate_series(1,100,5) i,
index 920e05324944148906627790e132fbc3dceaabcc..eec73b7fbe23741a80af1104f6d52042046eccc5 100644 (file)
@@ -449,7 +449,7 @@ SELECT brin_summarize_range('brin_summarize_idx', -1);
 SELECT brin_summarize_range('brin_summarize_idx', 4294967296);
 
 -- test value merging in add_value
-CREATE TABLE brintest_2 (n numrange);
+CREATE UNLOGGED TABLE brintest_2 (n numrange);
 CREATE INDEX brinidx_2 ON brintest_2 USING brin (n);
 INSERT INTO brintest_2 VALUES ('empty');
 INSERT INTO brintest_2 VALUES (numrange(0, 2^1000::numeric));
index 5194afcc1f56ca5fb51e2629a1e5df23d2d2b2b5..746880937bb0a3587178feae1fa0c9e8feffdf98 100644 (file)
@@ -52,7 +52,7 @@ select count(*) > 0 as ok from gin_test_tbl where i @> array[1];
 reset gin_fuzzy_search_limit;
 
 -- Test optimization of empty queries
-create temp table t_gin_test_tbl(i int4[], j int4[]);
+create unlogged table t_gin_test_tbl(i int4[], j int4[]);
 create index on t_gin_test_tbl using gin (i, j);
 insert into t_gin_test_tbl
 values
index d94a0bb2f7552c242191f5e850efd4bc6860e668..33602663702106ea9ab7e19c0e08a58d94f4229d 100644 (file)
@@ -41,7 +41,7 @@ reindex index gist_pointidx;
 -- Test Index-only plans on GiST indexes
 --
 
-create table gist_tbl (b box, p point, c circle);
+create unlogged table gist_tbl (b box, p point, c circle);
 
 insert into gist_tbl
 select box(point(0.05*i, 0.05*i), point(0.05*i, 0.05*i)),
index 7644f344a9187414ca72af56b807797889f1569b..f375025dcb1acd73d08701e5b94fc13f0a4c4bc1 100644 (file)
@@ -34,7 +34,7 @@ vacuum spgist_point_tbl;
 -- use box and && rather than point, so that rescan happens when the
 -- traverse stack is non-empty
 
-create table spgist_box_tbl(id serial, b box);
+create unlogged table spgist_box_tbl(id serial, b box);
 insert into spgist_box_tbl(b)
 select box(point(i,j),point(i+s,j+s))
   from generate_series(1,100,5) i,