pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: chris+postgresql@qwirx.com
Cc: pgsql-docs@postgresql.org
Subject: Re: SET CONSTRAINTS ALL IMMEDIATE affects SET TRANSACTION READ ONLY
Date: Mon, 10 Oct 2016 20:59:11 -0400
Message-ID: <23996.1476147551@sss.pgh.pa.us> (raw)
In-Reply-To: <d5262e05-5d96-6090-d665-482f036e1717@2ndquadrant.com>
References: <20160909065218.20022.15589@wrigleys.postgresql.org>
	<5491.1473439146@sss.pgh.pa.us>
	<d5262e05-5d96-6090-d665-482f036e1717@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 9/9/16 12:39 PM, Tom Lane wrote:
>> I wouldn't really imagine that it's sensible to set READ ONLY
>> mid-transaction at all, but if it means anything to do that, surely
>> it ought to mean that no updates can happen *after* you set it.

> I think there is a bit of code missing in check_transaction_read_only().
>  We prevent changing from read-only to read-write after the first query
> but not vice versa.  That seems like an oversight.

The comments around the code make it absolutely clear that it's
intentional, not an "oversight".  Whether it's a good idea is open
for discussion, certainly, but I don't see how you can imagine that
it wasn't considered.

			regards, tom lane


-- 
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs



view thread (5+ messages)  latest in thread

Message-ID: <23996.1476147551@sss.pgh.pa.us>
Permalink:  ../23996.1476147551@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23996.1476147551@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com, chris+postgresql@qwirx.com
  Subject: Re: SET CONSTRAINTS ALL IMMEDIATE affects SET TRANSACTION READ ONLY
  In-Reply-To: <23996.1476147551@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