[PATCH] hs_standby_disallowed test fix
Hello.
There is a recent commit about changes in way read-only commands are
prevented to be executed [1]/messages/by-id/154701965766.11631.2240747476287499810.pgcf@coridan.postgresql.org.
It seems like hs_standby_disallowed test is broken now.
So, a simple patch to fix the test is attached.
Thanks,
Michail.
[1]: /messages/by-id/154701965766.11631.2240747476287499810.pgcf@coridan.postgresql.org
Attachments:
hs_standby_regression_test_fix.patchtext/x-patch; charset=US-ASCII; name=hs_standby_regression_test_fix.patchDownload
diff --git a/src/test/regress/expected/hs_standby_disallowed.out b/src/test/regress/expected/hs_standby_disallowed.out
index dff0953e9a..8d3cafa5ce 100644
--- a/src/test/regress/expected/hs_standby_disallowed.out
+++ b/src/test/regress/expected/hs_standby_disallowed.out
@@ -64,7 +64,7 @@ SELECT count(*) FROM hs1;
(1 row)
COMMIT PREPARED 'foobar';
-ERROR: COMMIT PREPARED cannot run inside a transaction block
+ERROR: cannot execute COMMIT PREPARED during recovery
ROLLBACK;
BEGIN;
SELECT count(*) FROM hs1;
@@ -86,7 +86,7 @@ SELECT count(*) FROM hs1;
(1 row)
ROLLBACK PREPARED 'foobar';
-ERROR: ROLLBACK PREPARED cannot run inside a transaction block
+ERROR: cannot execute ROLLBACK PREPARED during recovery
ROLLBACK;
-- Locks
BEGIN;
On 2020/05/12 8:03, Michail Nikolaev wrote:
Hello.
There is a recent commit about changes in way read-only commands are
prevented to be executed [1].It seems like hs_standby_disallowed test is broken now.
So, a simple patch to fix the test is attached.
Thanks for the report and patch! LGTM.
I just wonder why standbycheck regression test doesn't run by default
in buildfarm. Which caused us not to notice this issue long time. Maybe
because it's difficult to set up hot-standby environment in the
regression test? If so, we might need to merge standbycheck test into
TAP tests for recovery.
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
On 2020/05/12 12:05, Fujii Masao wrote:
On 2020/05/12 8:03, Michail Nikolaev wrote:
Hello.
There is a recent commit about changes in way read-only commands are
prevented to be executed [1].It seems like hs_standby_disallowed test is broken now.
So, a simple patch to fix the test is attached.
Thanks for the report and patch! LGTM.
Pushed. Thanks!
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Fujii Masao <masao.fujii@oss.nttdata.com> writes:
I just wonder why standbycheck regression test doesn't run by default
in buildfarm. Which caused us not to notice this issue long time. Maybe
because it's difficult to set up hot-standby environment in the
regression test? If so, we might need to merge standbycheck test into
TAP tests for recovery.
It seems likely to me that the standbycheck stuff has been completely
obsoleted by the TAP-based recovery tests. We should get rid of it,
after adding any missing coverage to the TAP tests.
regards, tom lane
On 2020-05-12 19:35, Tom Lane wrote:
Fujii Masao <masao.fujii@oss.nttdata.com> writes:
I just wonder why standbycheck regression test doesn't run by default
in buildfarm. Which caused us not to notice this issue long time. Maybe
because it's difficult to set up hot-standby environment in the
regression test? If so, we might need to merge standbycheck test into
TAP tests for recovery.It seems likely to me that the standbycheck stuff has been completely
obsoleted by the TAP-based recovery tests. We should get rid of it,
after adding any missing coverage to the TAP tests.
I have looked into this a few times. It should definitely be done, but
there is actually a fair amount of coverage in the standbycheck that is
not in a TAP test, so it would be a fair amount of careful leg work to
get this all moved over.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services