From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tatsuo Ishii <ishii@postgresql.org>
Cc: pgsql-committers@postgresql.org
Subject: Re: pgsql: Fix document bug regarding read only transactions.
Date: Wed, 14 Jun 2017 21:21:51 -0400
Message-ID: <24379.1497489711@sss.pgh.pa.us> (raw)
In-Reply-To: <E1dLJJH-0002qE-DM@gemulon.postgresql.org>
References: <E1dLJJH-0002qE-DM@gemulon.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Tatsuo Ishii <ishii@postgresql.org> writes:
> Fix document bug regarding read only transactions.
> It was explained that read only transactions (not in standby) allow to
> update sequences. This had been wrong since the commit:
> 05d8a561ff85db1545f5768fe8d8dc9d99ad2ef7
This new text is not any more accurate than the old, it's just wrong
in the other direction. The actual behavior is still what's stated
in the commit message for that commit: read-only transactions on the
master are allowed to do nextval() on temp sequences but not permanent
ones.
regression=# create temp sequence s1;
CREATE SEQUENCE
regression=# create sequence s2;
CREATE SEQUENCE
regression=# begin transaction read only;
BEGIN
regression=# select nextval('s1');
nextval
---------
1
(1 row)
regression=# select nextval('s2');
ERROR: cannot execute nextval() in a read-only transaction
I think the correct fix would have been to change "update sequences"
to "update temporary sequences", not to remove it.
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, ishii@postgresql.org
Subject: Re: pgsql: Fix document bug regarding read only transactions.
In-Reply-To: <24379.1497489711@sss.pgh.pa.us>
References: <E1dLJJH-0002qE-DM@gemulon.postgresql.org> <24379.1497489711@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox