From: Bruce Momjian <bruce@momjian.us>
Date: Tue, 22 Apr 2014 21:23:58 +0000 (-0400)
Subject: regression test:  fix hot standby tests by using repeatable read
X-Git-Tag: REL9_4_BETA1~130
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2985e16031b61e9a428635e6860b3024570d3666;p=postgresql

regression test:  fix hot standby tests by using repeatable read

Serializable transactions won't work on a Hot Standby.  Also fix
VACUUM/ANALYZE label mixup.

Patch by Martín Marqués
---

diff --git a/src/test/regress/expected/hs_standby_allowed.out b/src/test/regress/expected/hs_standby_allowed.out
index 1abe5f6fe9..c26c9822f6 100644
--- a/src/test/regress/expected/hs_standby_allowed.out
+++ b/src/test/regress/expected/hs_standby_allowed.out
@@ -49,7 +49,7 @@ select count(*)  as should_be_1 from hs1;
 (1 row)
 
 end;
-begin transaction isolation level serializable;
+begin transaction isolation level repeatable read;
 select count(*) as should_be_1 from hs1;
  should_be_1 
 -------------
diff --git a/src/test/regress/expected/hs_standby_disallowed.out b/src/test/regress/expected/hs_standby_disallowed.out
index e7f4835092..bc117413ff 100644
--- a/src/test/regress/expected/hs_standby_disallowed.out
+++ b/src/test/regress/expected/hs_standby_disallowed.out
@@ -124,7 +124,7 @@ unlisten *;
 ERROR:  cannot execute UNLISTEN during recovery
 -- disallowed commands
 ANALYZE hs1;
-ERROR:  cannot execute VACUUM during recovery
+ERROR:  cannot execute ANALYZE during recovery
 VACUUM hs2;
 ERROR:  cannot execute VACUUM during recovery
 CLUSTER hs2 using hs1_pkey;
diff --git a/src/test/regress/sql/hs_standby_allowed.sql b/src/test/regress/sql/hs_standby_allowed.sql
index 58e2c010d3..7fc22148cb 100644
--- a/src/test/regress/sql/hs_standby_allowed.sql
+++ b/src/test/regress/sql/hs_standby_allowed.sql
@@ -28,7 +28,7 @@ begin transaction read only;
 select count(*)  as should_be_1 from hs1;
 end;
 
-begin transaction isolation level serializable;
+begin transaction isolation level repeatable read;
 select count(*) as should_be_1 from hs1;
 select count(*) as should_be_1 from hs1;
 select count(*) as should_be_1 from hs1;