summaryrefslogtreecommitdiffstats
path: root/src/test/regress/expected/hs_standby_functions.out
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/expected/hs_standby_functions.out
parentInitial commit. (diff)
downloadpostgresql-14-upstream.tar.xz
postgresql-14-upstream.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/expected/hs_standby_functions.out')
-rw-r--r--src/test/regress/expected/hs_standby_functions.out40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/test/regress/expected/hs_standby_functions.out b/src/test/regress/expected/hs_standby_functions.out
new file mode 100644
index 0000000..ce846b7
--- /dev/null
+++ b/src/test/regress/expected/hs_standby_functions.out
@@ -0,0 +1,40 @@
+--
+-- Hot Standby tests
+--
+-- hs_standby_functions.sql
+--
+-- should fail
+select pg_current_xact_id();
+ERROR: cannot execute pg_current_xact_id() during recovery
+select length(pg_current_snapshot()::text) >= 4;
+ ?column?
+----------
+ t
+(1 row)
+
+select pg_start_backup('should fail');
+ERROR: recovery is in progress
+HINT: WAL control functions cannot be executed during recovery.
+select pg_switch_wal();
+ERROR: recovery is in progress
+HINT: WAL control functions cannot be executed during recovery.
+select pg_stop_backup();
+ERROR: recovery is in progress
+HINT: WAL control functions cannot be executed during recovery.
+-- should return no rows
+select * from pg_prepared_xacts;
+ transaction | gid | prepared | owner | database
+-------------+-----+----------+-------+----------
+(0 rows)
+
+-- just the startup process
+select locktype, virtualxid, virtualtransaction, mode, granted
+from pg_locks where virtualxid = '1/1';
+ locktype | virtualxid | virtualtransaction | mode | granted
+------------+------------+--------------------+---------------+---------
+ virtualxid | 1/1 | 1/0 | ExclusiveLock | t
+(1 row)
+
+-- suicide is painless
+select pg_cancel_backend(pg_backend_pid());
+ERROR: canceling statement due to user request