Re: [HACKERS] Statement-level rollback

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: [HACKERS] Statement-level rollback
Дата
Msg-id CANP8+j+62e6ub6KM1Lrx7VDiEzyShz5gxexEoVYgMuz+vR7vhQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Statement-level rollback  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On 15 June 2018 at 21:23, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:

> I think the main objectionable point is that of making servers behave in
> a way that could lose data, if applications assume that transactions
> behave in the way they do today.  I propose that we solve this by
> allowing this feature to be enabled only via one of:
>
> * a PGOPTIONS connection-time option
> * ALTER USER SET (transaction_rollback_scope)
>
> but it can be *disabled* normally via SET.  In other words, changing the
> scope from transaction to statement in a running session is forbidden,
> but changing it the other way around is allowed (if app is unsure
> whether env is unsafe, it can set the scope to "transaction" to ensure
> it's safe from that point onwards).

If that allows us to annotate a function with SET
transaction_rollback_scope = whatever
then it works. We probably need to be able to identify code that
will/will not work in the new mode.

-- 
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: WAL prefetch
Следующее
От: Darafei "Komяpa" Praliaskouski
Дата:
Сообщение: Re: Postgres 11 release notes