summaryrefslogtreecommitdiffstats
path: root/src/test/regress/sql/hs_standby_functions.sql
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:15 +0000
commit6eb9c5a5657d1fe77b55cc261450f3538d35a94d (patch)
tree657d8194422a5daccecfd42d654b8a245ef7b4c8 /src/test/regress/sql/hs_standby_functions.sql
parentInitial commit. (diff)
downloadpostgresql-13-6eb9c5a5657d1fe77b55cc261450f3538d35a94d.tar.xz
postgresql-13-6eb9c5a5657d1fe77b55cc261450f3538d35a94d.zip
Adding upstream version 13.4.upstream/13.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/regress/sql/hs_standby_functions.sql')
-rw-r--r--src/test/regress/sql/hs_standby_functions.sql24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/regress/sql/hs_standby_functions.sql b/src/test/regress/sql/hs_standby_functions.sql
new file mode 100644
index 0000000..b57f67f
--- /dev/null
+++ b/src/test/regress/sql/hs_standby_functions.sql
@@ -0,0 +1,24 @@
+--
+-- Hot Standby tests
+--
+-- hs_standby_functions.sql
+--
+
+-- should fail
+select pg_current_xact_id();
+
+select length(pg_current_snapshot()::text) >= 4;
+
+select pg_start_backup('should fail');
+select pg_switch_wal();
+select pg_stop_backup();
+
+-- should return no rows
+select * from pg_prepared_xacts;
+
+-- just the startup process
+select locktype, virtualxid, virtualtransaction, mode, granted
+from pg_locks where virtualxid = '1/1';
+
+-- suicide is painless
+select pg_cancel_backend(pg_backend_pid());