| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
| Cc: | chris+postgresql(at)qwirx(dot)com, pgsql-docs(at)postgresql(dot)org |
| Subject: | Re: SET CONSTRAINTS ALL IMMEDIATE affects SET TRANSACTION READ ONLY |
| Date: | 2016-10-11 00:59:11 |
| Message-ID: | 23996.1476147551@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kevin Grittner | 2016-10-11 19:15:43 | Re: SET CONSTRAINTS ALL IMMEDIATE affects SET TRANSACTION READ ONLY |
| Previous Message | Peter Eisentraut | 2016-10-11 00:47:33 | Re: SET CONSTRAINTS ALL IMMEDIATE affects SET TRANSACTION READ ONLY |