4
-- hs_standby_functions.sql
8
ERROR: cannot execute txid_current() during recovery
9
select length(txid_current_snapshot()::text) >= 4;
15
select pg_start_backup('should fail');
16
ERROR: recovery is in progress
17
HINT: WAL control functions cannot be executed during recovery.
18
select pg_switch_xlog();
19
ERROR: recovery is in progress
20
HINT: WAL control functions cannot be executed during recovery.
21
select pg_stop_backup();
22
ERROR: recovery is in progress
23
HINT: WAL control functions cannot be executed during recovery.
24
-- should return no rows
25
select * from pg_prepared_xacts;
26
transaction | gid | prepared | owner | database
27
-------------+-----+----------+-------+----------
30
-- just the startup process
31
select locktype, virtualxid, virtualtransaction, mode, granted
32
from pg_locks where virtualxid = '1/1';
33
locktype | virtualxid | virtualtransaction | mode | granted
34
------------+------------+--------------------+---------------+---------
35
virtualxid | 1/1 | 1/0 | ExclusiveLock | t
38
-- suicide is painless
39
select pg_cancel_backend(pg_backend_pid());
40
ERROR: canceling statement due to user request