public inbox for [email protected]
help / color / mirror / Atom feedFrom: Amul Sul <[email protected]>
To: PostgreSQL Hackers <[email protected]>
Subject: tweak to a few index tests to hits ambuildempty() routine.
Date: Mon, 29 Nov 2021 10:34:06 +0530
Message-ID: <CAAJ_b95nneRCLM-=qELEdgCYSk6W_++-C+Q_t+wH3SW-hF50iw@mail.gmail.com> (raw)
Hi,
Attached patch is doing small changes to brin, gin & gist index tests
to use an unlogged table without changing the original intention of
those tests and that is able to hit ambuildempty() routing which is
otherwise not reachable by the current tests.
--
Regards,
Amul Sul
EDB: http://www.enterprisedb.com
Attachments:
[application/octet-stream] v1_index_test_for_ambuildempty.patch (3.3K, ../CAAJ_b95nneRCLM-=qELEdgCYSk6W_++-C+Q_t+wH3SW-hF50iw@mail.gmail.com/2-v1_index_test_for_ambuildempty.patch)
download | inline diff:
diff --git a/src/test/regress/expected/brin.out b/src/test/regress/expected/brin.out
index e53d6e48856..ae4c424e79f 100644
--- a/src/test/regress/expected/brin.out
+++ b/src/test/regress/expected/brin.out
@@ -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));
diff --git a/src/test/regress/expected/gin.out b/src/test/regress/expected/gin.out
index 6402e89c7ff..1a0c3c6167f 100644
--- a/src/test/regress/expected/gin.out
+++ b/src/test/regress/expected/gin.out
@@ -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
diff --git a/src/test/regress/expected/gist.out b/src/test/regress/expected/gist.out
index 90edb4061d4..c1af87f7f32 100644
--- a/src/test/regress/expected/gist.out
+++ b/src/test/regress/expected/gist.out
@@ -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),
diff --git a/src/test/regress/sql/brin.sql b/src/test/regress/sql/brin.sql
index 3bd866d947a..33a30fcf777 100644
--- a/src/test/regress/sql/brin.sql
+++ b/src/test/regress/sql/brin.sql
@@ -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));
diff --git a/src/test/regress/sql/gin.sql b/src/test/regress/sql/gin.sql
index 5194afcc1f5..746880937bb 100644
--- a/src/test/regress/sql/gin.sql
+++ b/src/test/regress/sql/gin.sql
@@ -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
diff --git a/src/test/regress/sql/gist.sql b/src/test/regress/sql/gist.sql
index b9d398ea941..3849b649a2c 100644
--- a/src/test/regress/sql/gist.sql
+++ b/src/test/regress/sql/gist.sql
@@ -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)),
view thread (15+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: tweak to a few index tests to hits ambuildempty() routine.
In-Reply-To: <CAAJ_b95nneRCLM-=qELEdgCYSk6W_++-C+Q_t+wH3SW-hF50iw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox