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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Dmitry Koval <d(dot)koval(at)postgrespro(dot)ru>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, andrewbille(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Subject: Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end
Date: 2022-09-26 03:40:55
Message-ID: YzEfR9UUb3gqRjoA@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Sat, Sep 24, 2022 at 04:57:51PM -0400, Tom Lane wrote:
> but that isn't great either: it seems redundant and confusing.
> I think we could just make it
>
> errmsg("parameter \"%s\" cannot be set locally in functions",
>
> because that's really the only case users should ever see.

Yes, agreed that "cannot be set locally in functions" should be
enough.

> Other than the message-wording issue, I think v6-0001 is OK.

Just to be sure about something here. The change of behavior with SET
in the context of a PL makes this patch unsuitable for a backpatch,
hence the plan is to apply this stuff only on HEAD, right?

+ <entry><literal>NO_RESET</literal></entry>
+ <entry>Parameters with this flag do not support
+ <command>RESET</command> commands.
+ </entry>

As per the issue with SET commands used with functions, this
description does not completely reflect the reality.

> 0002 seems quite invasive and hard to review compared to what it
> accomplishes. I think we should just keep the flags in the same
> order, stick in GUC_NO_RESET in front of GUC_NO_RESET_ALL, and
> renumber the flag values as needed. I did not change 0002 below,
> though.

0002 is not that confusing to me: the units are moved to be first and
to use the first flag bytes, while the more conceptual flags are moved
to be always after. I would have reorganized a bit more the
description flags, TBH.
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-09-26 04:07:50 Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end
Previous Message PG Bug reporting form 2022-09-26 03:00:41 BUG #17622: a potential bug of NPD