Re: SET CONSTRAINTS ALL IMMEDIATE affects SET TRANSACTION READ ONLY

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SET CONSTRAINTS ALL IMMEDIATE affects SET TRANSACTION READ ONLY
Дата
Msg-id 23996.1476147551@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SET CONSTRAINTS ALL IMMEDIATE affects SET TRANSACTION READ ONLY  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: SET CONSTRAINTS ALL IMMEDIATE affects SET TRANSACTION READ ONLY  (Kevin Grittner <kgrittn@gmail.com>)
Список pgsql-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


В списке pgsql-docs по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: SET CONSTRAINTS ALL IMMEDIATE affects SET TRANSACTION READ ONLY
Следующее
От: dpakalnis@gmail.com
Дата:
Сообщение: Change parameters list