aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2011-06-05 22:30:04 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2011-06-05 22:31:05 -0400
commitdccfb72892acabd25568539ec882cc44c57c25bd (patch)
treeddc8950231ad7b41a9b6f2c1b87cc886b844dd64 /src/test
parentccd69b888641441b2332dc928ada1390dd0c318a (diff)
downloadpostgresql-dccfb72892acabd25568539ec882cc44c57c25bd.tar.gz
postgresql-dccfb72892acabd25568539ec882cc44c57c25bd.zip
Reset reindex-in-progress state before reverifying an exclusion constraint.
This avoids an Assert failure when we try to use ordinary index fetches while checking for exclusion conflicts. Per report from Noah Misch. No need for back-patch because the Assert wasn't there before 9.1.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/input/constraints.source3
-rw-r--r--src/test/regress/output/constraints.source2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/test/regress/input/constraints.source b/src/test/regress/input/constraints.source
index 0d278212c02..b84d51e9e52 100644
--- a/src/test/regress/input/constraints.source
+++ b/src/test/regress/input/constraints.source
@@ -397,6 +397,9 @@ INSERT INTO circles VALUES('<(20,20), 10>', '<(10,10), 5>');
ALTER TABLE circles ADD EXCLUDE USING gist
(c1 WITH &&, (c2::circle) WITH &&);
+-- try reindexing an existing constraint
+REINDEX INDEX circles_c1_c2_excl;
+
DROP TABLE circles;
-- Check deferred exclusion constraint
diff --git a/src/test/regress/output/constraints.source b/src/test/regress/output/constraints.source
index d164b90af78..e2f29399315 100644
--- a/src/test/regress/output/constraints.source
+++ b/src/test/regress/output/constraints.source
@@ -543,6 +543,8 @@ ALTER TABLE circles ADD EXCLUDE USING gist
NOTICE: ALTER TABLE / ADD EXCLUDE will create implicit index "circles_c1_c2_excl1" for table "circles"
ERROR: could not create exclusion constraint "circles_c1_c2_excl1"
DETAIL: Key (c1, (c2::circle))=(<(0,0),5>, <(0,0),5>) conflicts with key (c1, (c2::circle))=(<(0,0),5>, <(0,0),4>).
+-- try reindexing an existing constraint
+REINDEX INDEX circles_c1_c2_excl;
DROP TABLE circles;
-- Check deferred exclusion constraint
CREATE TABLE deferred_excl (