Regression test errors

Started by Martín Marquésalmost 12 years ago3 messages
#1Martín Marqués
martin@2ndquadrant.com
2 attachment(s)

I was testing some builds I was doing and found that the regression
tests fails when doing the against a Hot Standby server:

$ make standbycheck
[...]
============== running regression test queries ==============
test hs_standby_check ... ok
test hs_standby_allowed ... FAILED
test hs_standby_disallowed ... FAILED
test hs_standby_functions ... ok

======================
2 of 4 tests failed.
======================

The differences that caused some tests to fail can be viewed in the
file "/usr/local/postgresql-9.3.3/src/test/regress/regression.diffs".
A copy of the test summary that you see
above is saved in the file
"/usr/local/postgresql-9.3.3/src/test/regress/regression.out".

The regression.diffs and patch attached.

I haven't checked how far back those go. I don't think it's even
important to back patch this, but it's nice for future testing.

Regards,

--
Martín Marqués http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachments:

regression.diffsapplication/octet-stream; name=regression.diffsDownload
*** /usr/local/postgresql-9.3.3/src/test/regress/expected/hs_standby_allowed.out	2014-02-17 16:29:55.000000000 -0300
--- /usr/local/postgresql-9.3.3/src/test/regress/results/hs_standby_allowed.out	2014-03-07 21:37:55.243000134 -0300
***************
*** 50,55 ****
--- 50,57 ----
  
  end;
  begin transaction isolation level serializable;
+ ERROR:  cannot use serializable mode in a hot standby
+ HINT:  You can use REPEATABLE READ instead.
  select count(*) as should_be_1 from hs1;
   should_be_1 
  -------------
***************
*** 69,74 ****
--- 71,77 ----
  (1 row)
  
  commit;
+ WARNING:  there is no transaction in progress
  begin;
  select count(*) as should_be_1 from hs1;
   should_be_1 

======================================================================

*** /usr/local/postgresql-9.3.3/src/test/regress/expected/hs_standby_disallowed.out	2014-02-17 16:29:55.000000000 -0300
--- /usr/local/postgresql-9.3.3/src/test/regress/results/hs_standby_disallowed.out	2014-03-07 21:37:55.276000154 -0300
***************
*** 124,130 ****
  ERROR:  cannot execute UNLISTEN during recovery
  -- disallowed commands
  ANALYZE hs1;
! ERROR:  cannot execute VACUUM during recovery
  VACUUM hs2;
  ERROR:  cannot execute VACUUM during recovery
  CLUSTER hs2 using hs1_pkey;
--- 124,130 ----
  ERROR:  cannot execute UNLISTEN during recovery
  -- disallowed commands
  ANALYZE hs1;
! ERROR:  cannot execute ANALYZE during recovery
  VACUUM hs2;
  ERROR:  cannot execute VACUUM during recovery
  CLUSTER hs2 using hs1_pkey;

======================================================================

0001-Standby-regression-checks-failed.patchtext/x-patch; charset=US-ASCII; name=0001-Standby-regression-checks-failed.patchDownload
From b6db8388e37f6afaa431e31239fd972d10140cc1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mart=C3=ADn=20Marqu=C3=A9s?= <martin@2ndquadrant.com>
Date: Fri, 7 Mar 2014 21:29:29 -0300
Subject: [PATCH] Standby regression checks failed.

Two Hot Standby regression tests failed for various reasones.

- An error in src/test/regress/expected/hs_standby_disallowed.out
  made regression fail (VACUUM should be ANALYZE).
- Serializable transactions won't work on a Hot Standby.
---
 src/test/regress/expected/hs_standby_allowed.out    | 2 +-
 src/test/regress/expected/hs_standby_disallowed.out | 2 +-
 src/test/regress/sql/hs_standby_allowed.sql         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/test/regress/expected/hs_standby_allowed.out b/src/test/regress/expected/hs_standby_allowed.out
index 1abe5f6..9d18d77 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 readrepeatable;
 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 e7f4835..bc11741 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 58e2c01..5cd450d 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 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;
-- 
1.8.3.1

#2Martín Marqués
martin@2ndquadrant.com
In reply to: Martín Marqués (#1)
1 attachment(s)
Re: Regression test errors

OK, noticed how horrible this patch was (thanks for the heads up from
Jaime Casanova). This happens when trying to fetch changes one made on
a test copy after a day of lots of work back to a git repository: you
just make very silly mistakes.

Well, now I got the changes right (tested the patch, because silly
changes should be tested as well ;)).

2014-03-07 21:46 GMT-03:00 Martín Marqués <martin@2ndquadrant.com>:

I was testing some builds I was doing and found that the regression
tests fails when doing the against a Hot Standby server:

$ make standbycheck
[...]
============== running regression test queries ==============
test hs_standby_check ... ok
test hs_standby_allowed ... FAILED
test hs_standby_disallowed ... FAILED
test hs_standby_functions ... ok

======================
2 of 4 tests failed.
======================

The differences that caused some tests to fail can be viewed in the
file "/usr/local/postgresql-9.3.3/src/test/regress/regression.diffs".
A copy of the test summary that you see
above is saved in the file
"/usr/local/postgresql-9.3.3/src/test/regress/regression.out".

The regression.diffs and patch attached.

I haven't checked how far back those go. I don't think it's even
important to back patch this, but it's nice for future testing.

Regards,

--
Martín Marqués http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

--
Martín Marqués http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachments:

0001-Two-Hot-Standby-regression-tests-failed-for-various-.patchtext/x-diff; charset=US-ASCII; name=0001-Two-Hot-Standby-regression-tests-failed-for-various-.patchDownload
From 82b4d69d3980ad8852bbf2de67abd4105b328d3e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mart=C3=ADn=20Marqu=C3=A9s?= <martin@2ndquadrant.com>
Date: Sun, 9 Mar 2014 08:58:17 -0300
Subject: [PATCH] Two Hot Standby regression tests failed for various reasons.

- One error was due to the fact that it was checking for a VACUUM error
  on an ANALYZE call in src/test/regress/expected/hs_standby_disallowed.out
- Serializable transactions won't work on a Hot Standby.
---
 src/test/regress/expected/hs_standby_allowed.out    | 2 +-
 src/test/regress/expected/hs_standby_disallowed.out | 2 +-
 src/test/regress/sql/hs_standby_allowed.sql         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/test/regress/expected/hs_standby_allowed.out b/src/test/regress/expected/hs_standby_allowed.out
index 1abe5f6..c26c982 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 e7f4835..bc11741 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 58e2c01..7fc2214 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;
-- 
1.8.3.1

#3Bruce Momjian
bruce@momjian.us
In reply to: Martín Marqués (#2)
Re: Regression test errors

On Sun, Mar 9, 2014 at 09:23:33AM -0300, Mart�n Marqu�s wrote:

OK, noticed how horrible this patch was (thanks for the heads up from
Jaime Casanova). This happens when trying to fetch changes one made on
a test copy after a day of lots of work back to a git repository: you
just make very silly mistakes.

Well, now I got the changes right (tested the patch, because silly
changes should be tested as well ;)).

Patch applied to head. Thanks.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers