summaryrefslogtreecommitdiff
path: root/src/test/regress/expected/hs_standby_disallowed.out
blob: 8d3cafa5cecbe9516e9337ad353097d9960546c5 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
--
-- Hot Standby tests
--
-- hs_standby_disallowed.sql
--
SET transaction_read_only = off;
ERROR:  cannot set transaction read-write mode during recovery
begin transaction read write;
ERROR:  cannot set transaction read-write mode during recovery
commit;
WARNING:  there is no transaction in progress
-- SELECT
select * from hs1 FOR SHARE;
ERROR:  cannot execute SELECT FOR SHARE in a read-only transaction
select * from hs1 FOR UPDATE;
ERROR:  cannot execute SELECT FOR UPDATE in a read-only transaction
-- DML
BEGIN;
insert into hs1 values (37);
ERROR:  cannot execute INSERT in a read-only transaction
ROLLBACK;
BEGIN;
delete from hs1 where col1 = 1;
ERROR:  cannot execute DELETE in a read-only transaction
ROLLBACK;
BEGIN;
update hs1 set col1 = NULL where col1 > 0;
ERROR:  cannot execute UPDATE in a read-only transaction
ROLLBACK;
BEGIN;
truncate hs3;
ERROR:  cannot execute TRUNCATE TABLE in a read-only transaction
ROLLBACK;
-- DDL
create temporary table hstemp1 (col1 integer);
ERROR:  cannot execute CREATE TABLE in a read-only transaction
BEGIN;
drop table hs2;
ERROR:  cannot execute DROP TABLE in a read-only transaction
ROLLBACK;
BEGIN;
create table hs4 (col1 integer);
ERROR:  cannot execute CREATE TABLE in a read-only transaction
ROLLBACK;
-- Sequences
SELECT nextval('hsseq');
ERROR:  cannot execute nextval() in a read-only transaction
-- Two-phase commit transaction stuff
BEGIN;
SELECT count(*) FROM hs1;
 count 
-------
     1
(1 row)

PREPARE TRANSACTION 'foobar';
ERROR:  cannot execute PREPARE TRANSACTION during recovery
ROLLBACK;
BEGIN;
SELECT count(*) FROM hs1;
 count 
-------
     1
(1 row)

COMMIT PREPARED 'foobar';
ERROR:  cannot execute COMMIT PREPARED during recovery
ROLLBACK;
BEGIN;
SELECT count(*) FROM hs1;
 count 
-------
     1
(1 row)

PREPARE TRANSACTION 'foobar';
ERROR:  cannot execute PREPARE TRANSACTION during recovery
ROLLBACK PREPARED 'foobar';
ERROR:  current transaction is aborted, commands ignored until end of transaction block
ROLLBACK;
BEGIN;
SELECT count(*) FROM hs1;
 count 
-------
     1
(1 row)

ROLLBACK PREPARED 'foobar';
ERROR:  cannot execute ROLLBACK PREPARED during recovery
ROLLBACK;
-- Locks
BEGIN;
LOCK hs1;
ERROR:  cannot execute LOCK TABLE during recovery
COMMIT;
BEGIN;
LOCK hs1 IN SHARE UPDATE EXCLUSIVE MODE;
ERROR:  cannot execute LOCK TABLE during recovery
COMMIT;
BEGIN;
LOCK hs1 IN SHARE MODE;
ERROR:  cannot execute LOCK TABLE during recovery
COMMIT;
BEGIN;
LOCK hs1 IN SHARE ROW EXCLUSIVE MODE;
ERROR:  cannot execute LOCK TABLE during recovery
COMMIT;
BEGIN;
LOCK hs1 IN EXCLUSIVE MODE;
ERROR:  cannot execute LOCK TABLE during recovery
COMMIT;
BEGIN;
LOCK hs1 IN ACCESS EXCLUSIVE MODE;
ERROR:  cannot execute LOCK TABLE during recovery
COMMIT;
-- Listen
listen a;
ERROR:  cannot execute LISTEN during recovery
notify a;
ERROR:  cannot execute NOTIFY during recovery
-- disallowed commands
ANALYZE hs1;
ERROR:  cannot execute ANALYZE during recovery
VACUUM hs2;
ERROR:  cannot execute VACUUM during recovery
CLUSTER hs2 using hs1_pkey;
ERROR:  cannot execute CLUSTER during recovery
REINDEX TABLE hs2;
ERROR:  cannot execute REINDEX during recovery
REVOKE SELECT ON hs1 FROM PUBLIC;
ERROR:  cannot execute REVOKE in a read-only transaction
GRANT SELECT ON hs1 TO PUBLIC;
ERROR:  cannot execute GRANT in a read-only transaction