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

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-22 02:03:24
Message-ID: CAD21AoD6n62NXB5OuYSONYHKNkR=fqvJ5+82y=4Z=-KuFeOV0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Jul 1, 2022 at 2:11 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Wed, Jun 29, 2022 at 3:48 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> > On Tue, Jun 28, 2022 at 03:58:41PM +0900, Masahiko Sawada wrote:
> > > Agreed. I've attached an updated patch.
> >
> > +#define GUC_NO_RESET 0x400000 /* not support RESET and save */
> >
> > It is a bit sad to see this new flag with this number, separated from
> > its cousin properties. Could it be better to reorganize the flag
> > values and give more room to the properties? The units for memory and
> > time could go first, for example.
>
> It seems a good idea, I'll update it in the next version patch.
>
> >
> > +CREATE FUNCTION errfunc() RETURNS int LANGUAGE SQL AS 'SELECT 1'
> > +SET transaction_read_only = on; -- error
> > +ERROR: parameter "transaction_read_only" cannot be reset
> > Well, this is confusing when setting a GUC_NO_RESET in the context of
> > GUC_ACTION_SAVE.
>
> Right, how about "parameter %s cannot be set"?
>
> > By the way, what about "seed"?
>
> Resetting seed is no-op so it might be better to throw an error when
> resetting the seed rather than doing nothing silently.

I've attached patches.

I did the reorganization of GUC flags in a separate patch (0002 patch)
since it's not relevant with the new flag GUC_NO_RESET.

Regards,

--
Masahiko Sawada
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v5-0001-Introduce-GUC_NO_RESET-flag.patch application/octet-stream 11.7 KB
v5-0002-Reorganize-GUC_XXX-flag-values.patch application/octet-stream 4.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message qtds_126 2022-09-22 06:53:10 Re: The keyword in the procedure's error message is "function", which should be "procedure"
Previous Message PG Bug reporting form 2022-09-21 15:57:21 BUG #17619: AllocSizeIsValid violation in parallel hash join