summaryrefslogtreecommitdiffstats
path: root/src/test/regress/sql/hs_standby_check.sql
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:15:05 +0000
commit46651ce6fe013220ed397add242004d764fc0153 (patch)
tree6e5299f990f88e60174a1d3ae6e48eedd2688b2b /src/test/regress/sql/hs_standby_check.sql
parentInitial commit. (diff)
downloadpostgresql-14-46651ce6fe013220ed397add242004d764fc0153.tar.xz
postgresql-14-46651ce6fe013220ed397add242004d764fc0153.zip
Adding upstream version 14.5.upstream/14.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/regress/sql/hs_standby_check.sql')
-rw-r--r--src/test/regress/sql/hs_standby_check.sql16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/regress/sql/hs_standby_check.sql b/src/test/regress/sql/hs_standby_check.sql
new file mode 100644
index 0000000..3fe8a02
--- /dev/null
+++ b/src/test/regress/sql/hs_standby_check.sql
@@ -0,0 +1,16 @@
+--
+-- Hot Standby tests
+--
+-- hs_standby_check.sql
+--
+
+--
+-- If the query below returns false then all other tests will fail after it.
+--
+select case pg_is_in_recovery() when false then
+ 'These tests are intended only for execution on a standby server that is reading ' ||
+ 'WAL from a server upon which the regression database is already created and into ' ||
+ 'which src/test/regress/sql/hs_primary_setup.sql has been run'
+else
+ 'Tests are running on a standby server during recovery'
+end;