Skip site navigation (1) Skip section navigation (2)

Document bug regarding read only transactions

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Document bug regarding read only transactions
Date: 2017-06-14 02:08:26
Message-ID: 20170614.110826.425627939780392324.t-ishii@sraoss.co.jp (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackers
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

Attachment: high-availability.diff
Description: text/x-patch (684 bytes)

Responses

pgsql-hackers by date

Next:From: Amit LangoteDate: 2017-06-14 02:13:23
Subject: Re: A bug in mapping attributes in ATExecAttachPartition()
Previous:From: Robert HaasDate: 2017-06-14 01:50:58
Subject: Re: A bug in mapping attributes in ATExecAttachPartition()

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group