In https://www.postgresql.org/docs/10/static/hot-standby.html#hot-standby-users
It is explained that read only transactions (not in standby) allow to update sequences. In normal operation, <quote>read-only</> transactions are allowed to update sequences and to use <command>LISTEN</>, <command>UNLISTEN</>, and <command>NOTIFY</>, so Hot Standby sessions operate under slightly tighter restrictions than ordinary read-only sessions. It is possible that some of these restrictions might be loosened in a future release. This is plain wrong. BEGIN; BEGIN test=# SET transaction_read_only TO on; SET test=# SELECT nextval('t1_i_seq'); ERROR: cannot execute nextval() in a read-only transaction test=# \q Attached is the patch against master branch. Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml index 92e3b45..91cbabd 100644 --- a/doc/src/sgml/high-availability.sgml +++ b/doc/src/sgml/high-availability.sgml @@ -1824,7 +1824,7 @@ if (!triggered) <para> In normal operation, <quote>read-only</> transactions are allowed to - update sequences and to use <command>LISTEN</>, <command>UNLISTEN</>, and + use <command>LISTEN</>, <command>UNLISTEN</>, and <command>NOTIFY</>, so Hot Standby sessions operate under slightly tighter restrictions than ordinary read-only sessions. It is possible that some of these restrictions might be loosened in a future release.
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers