Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dLJTy-0002OC-1I for pgsql-committers@arkaria.postgresql.org; Thu, 15 Jun 2017 01:21:58 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dLJTx-0004e5-EU for pgsql-committers@arkaria.postgresql.org; Thu, 15 Jun 2017 01:21:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dLJTw-0004dr-Uj for pgsql-committers@postgresql.org; Thu, 15 Jun 2017 01:21:56 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dLJTt-0003Uy-MK; Thu, 15 Jun 2017 01:21:56 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v5F1Lpc9024380; Wed, 14 Jun 2017 21:21:51 -0400 From: Tom Lane To: Tatsuo Ishii cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Fix document bug regarding read only transactions. In-reply-to: References: Comments: In-reply-to Tatsuo Ishii message dated "Thu, 15 Jun 2017 01:10:55 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24378.1497489711.1@sss.pgh.pa.us> Date: Wed, 14 Jun 2017 21:21:51 -0400 Message-ID: <24379.1497489711@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Tatsuo Ishii 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