summaryrefslogtreecommitdiffstats
path: root/src/test/regress/expected/hs_standby_functions.out
blob: ce846b758bf8c8519732316989b12353cbd89fe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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