4 -- hs_standby_disallowed.sql
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
11 WARNING: there is no transaction in progress
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
19 insert into hs1 values (37);
20 ERROR: cannot execute INSERT in a read-only transaction
23 delete from hs1 where col1 = 1;
24 ERROR: cannot execute DELETE in a read-only transaction
27 update hs1 set col1 = NULL where col1 > 0;
28 ERROR: cannot execute UPDATE in a read-only transaction
32 ERROR: cannot execute TRUNCATE TABLE in a read-only transaction
35 create temporary table hstemp1 (col1 integer);
36 ERROR: cannot execute CREATE TABLE in a read-only transaction
39 ERROR: cannot execute DROP TABLE in a read-only transaction
42 create table hs4 (col1 integer);
43 ERROR: cannot execute CREATE TABLE in a read-only transaction
46 SELECT nextval('hsseq');
47 ERROR: cannot execute nextval() in a read-only transaction
48 -- Two-phase commit transaction stuff
50 SELECT count(*) FROM hs1;
56 PREPARE TRANSACTION 'foobar';
57 ERROR: cannot execute PREPARE TRANSACTION during recovery
60 SELECT count(*) FROM hs1;
66 COMMIT PREPARED 'foobar';
67 ERROR: cannot execute COMMIT PREPARED during recovery
70 SELECT count(*) FROM hs1;
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
82 SELECT count(*) FROM hs1;
88 ROLLBACK PREPARED 'foobar';
89 ERROR: cannot execute ROLLBACK PREPARED during recovery
94 ERROR: cannot execute LOCK TABLE during recovery
97 LOCK hs1 IN SHARE UPDATE EXCLUSIVE MODE;
98 ERROR: cannot execute LOCK TABLE during recovery
101 LOCK hs1 IN SHARE MODE;
102 ERROR: cannot execute LOCK TABLE during recovery
105 LOCK hs1 IN SHARE ROW EXCLUSIVE MODE;
106 ERROR: cannot execute LOCK TABLE during recovery
109 LOCK hs1 IN EXCLUSIVE MODE;
110 ERROR: cannot execute LOCK TABLE during recovery
113 LOCK hs1 IN ACCESS EXCLUSIVE MODE;
114 ERROR: cannot execute LOCK TABLE during recovery
118 ERROR: cannot execute LISTEN during recovery
120 ERROR: cannot execute NOTIFY during recovery
121 -- disallowed commands
123 ERROR: cannot execute ANALYZE during recovery
125 ERROR: cannot execute VACUUM during recovery
126 CLUSTER hs2 using hs1_pkey;
127 ERROR: cannot execute CLUSTER during recovery
129 ERROR: cannot execute REINDEX during recovery
130 REVOKE SELECT ON hs1 FROM PUBLIC;
131 ERROR: cannot execute REVOKE in a read-only transaction
132 GRANT SELECT ON hs1 TO PUBLIC;
133 ERROR: cannot execute GRANT in a read-only transaction