Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end
Дата
Msg-id 515672.1646838707@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-bugs
Masahiko Sawada <sawada.mshk@gmail.com> writes:
> On Wed, Feb 16, 2022 at 1:55 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Yeah, I was considering that too.  A new GUC_NO_RESET flag would be
>> cheaper than running the check hooks during RESET, and probably
>> safer too.  On the other hand, we would lose the property that
>> you can reset these settings as long as you've not yet taken a
>> snapshot.  I wonder whether there is any code out there that
>> depends on that ...

> Indeed. I guess that it's relatively common that the transaction
> isolation level is set after BEGIN TRANSACTION but I've not heard that
> it's reset after BEGIN TRANSACTION with setting non-default
> transaction isolation level.

Yes, we certainly have to preserve the SET case, but using RESET
in that way seems like it'd be pretty weird coding.  I'd have no
hesitation about banning it in a HEAD-only change.  I'm slightly
more nervous about doing so in a back-patched bug fix.  On the
other hand, starting to call check hooks in a context that did
not use them before is also scary to back-patch.

Do you want to draft up a patch that fixes this with a new
GUC flag?

            regards, tom lane



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

Предыдущее
От: Sergey Mirvoda
Дата:
Сообщение: 2000 times performance drop after pg14 upgrade when JIT = 1
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17431: How to change postgres path to recognize pearl installation