]> granicus.if.org Git - postgresql/blob - src/test/regress/expected/hs_standby_disallowed.out
Remove useless whitespace at end of lines
[postgresql] / src / test / regress / expected / hs_standby_disallowed.out
1 --
2 -- Hot Standby tests
3 --
4 -- hs_standby_disallowed.sql
5 --
6 SET transaction_read_only = off;
7 ERROR:  cannot set transaction read-write mode during recovery
8 begin transaction read write;
9 ERROR:  cannot set transaction read-write mode during recovery
10 commit;
11 WARNING:  there is no transaction in progress
12 -- SELECT
13 select * from hs1 FOR SHARE;
14 ERROR:  cannot execute SELECT FOR SHARE in a read-only transaction
15 select * from hs1 FOR UPDATE;
16 ERROR:  cannot execute SELECT FOR UPDATE in a read-only transaction
17 -- DML
18 BEGIN;
19 insert into hs1 values (37);
20 ERROR:  cannot execute INSERT in a read-only transaction
21 ROLLBACK;
22 BEGIN;
23 delete from hs1 where col1 = 1;
24 ERROR:  cannot execute DELETE in a read-only transaction
25 ROLLBACK;
26 BEGIN;
27 update hs1 set col1 = NULL where col1 > 0;
28 ERROR:  cannot execute UPDATE in a read-only transaction
29 ROLLBACK;
30 BEGIN;
31 truncate hs3;
32 ERROR:  cannot execute TRUNCATE TABLE in a read-only transaction
33 ROLLBACK;
34 -- DDL
35 create temporary table hstemp1 (col1 integer);
36 ERROR:  cannot execute CREATE TABLE in a read-only transaction
37 BEGIN;
38 drop table hs2;
39 ERROR:  cannot execute DROP TABLE in a read-only transaction
40 ROLLBACK;
41 BEGIN;
42 create table hs4 (col1 integer);
43 ERROR:  cannot execute CREATE TABLE in a read-only transaction
44 ROLLBACK;
45 -- Sequences
46 SELECT nextval('hsseq');
47 ERROR:  cannot execute nextval() in a read-only transaction
48 -- Two-phase commit transaction stuff
49 BEGIN;
50 SELECT count(*) FROM hs1;
51  count 
52 -------
53      1
54 (1 row)
55
56 PREPARE TRANSACTION 'foobar';
57 ERROR:  cannot execute PREPARE TRANSACTION during recovery
58 ROLLBACK;
59 BEGIN;
60 SELECT count(*) FROM hs1;
61  count 
62 -------
63      1
64 (1 row)
65
66 COMMIT PREPARED 'foobar';
67 ERROR:  COMMIT PREPARED cannot run inside a transaction block
68 ROLLBACK;
69 BEGIN;
70 SELECT count(*) FROM hs1;
71  count 
72 -------
73      1
74 (1 row)
75
76 PREPARE TRANSACTION 'foobar';
77 ERROR:  cannot execute PREPARE TRANSACTION during recovery
78 ROLLBACK PREPARED 'foobar';
79 ERROR:  current transaction is aborted, commands ignored until end of transaction block
80 ROLLBACK;
81 BEGIN;
82 SELECT count(*) FROM hs1;
83  count 
84 -------
85      1
86 (1 row)
87
88 ROLLBACK PREPARED 'foobar';
89 ERROR:  ROLLBACK PREPARED cannot run inside a transaction block
90 ROLLBACK;
91 -- Locks
92 BEGIN;
93 LOCK hs1;
94 ERROR:  cannot execute LOCK TABLE during recovery
95 COMMIT;
96 BEGIN;
97 LOCK hs1 IN SHARE UPDATE EXCLUSIVE MODE;
98 ERROR:  cannot execute LOCK TABLE during recovery
99 COMMIT;
100 BEGIN;
101 LOCK hs1 IN SHARE MODE;
102 ERROR:  cannot execute LOCK TABLE during recovery
103 COMMIT;
104 BEGIN;
105 LOCK hs1 IN SHARE ROW EXCLUSIVE MODE;
106 ERROR:  cannot execute LOCK TABLE during recovery
107 COMMIT;
108 BEGIN;
109 LOCK hs1 IN EXCLUSIVE MODE;
110 ERROR:  cannot execute LOCK TABLE during recovery
111 COMMIT;
112 BEGIN;
113 LOCK hs1 IN ACCESS EXCLUSIVE MODE;
114 ERROR:  cannot execute LOCK TABLE during recovery
115 COMMIT;
116 -- Listen
117 listen a;
118 ERROR:  cannot execute LISTEN during recovery
119 notify a;
120 ERROR:  cannot execute NOTIFY during recovery
121 unlisten a;
122 ERROR:  cannot execute UNLISTEN during recovery
123 unlisten *;
124 ERROR:  cannot execute UNLISTEN during recovery
125 -- disallowed commands
126 ANALYZE hs1;
127 ERROR:  cannot execute VACUUM during recovery
128 VACUUM hs2;
129 ERROR:  cannot execute VACUUM during recovery
130 CLUSTER hs2 using hs1_pkey;
131 ERROR:  cannot execute CLUSTER during recovery
132 REINDEX TABLE hs2;
133 ERROR:  cannot execute REINDEX during recovery
134 REVOKE SELECT ON hs1 FROM PUBLIC;
135 ERROR:  cannot execute REVOKE in a read-only transaction
136 GRANT SELECT ON hs1 TO PUBLIC;
137 ERROR:  cannot execute GRANT in a read-only transaction