Peter Eisentraut <peter.eisentr...@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