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

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: sawada(dot)mshk(at)gmail(dot)com
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, d(dot)koval(at)postgrespro(dot)ru, dilipbalaut(at)gmail(dot)com, andrewbille(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end
Date: 2022-03-14 08:30:00
Message-ID: 20220314.173000.398225758850773114.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

At Mon, 14 Mar 2022 17:12:18 +0900, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote in
> On Sat, Mar 12, 2022 at 4:53 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >
> > Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> writes:
> > > I've attached a draft patch for discussion.
> >
> > Hm, I think that trying to RESET a GUC_NO_RESET variable ought to
> > actively throw an error. Silently doing nothing will look like
> > a bug.
>
> Agreed. I've attached an updated patch.

FWIW,

+ /* Check if the parameter supports RESET */
+ if (record->flags & GUC_NO_RESET && value == NULL)
+ {
+ ereport(elevel,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("parameter \"%s\" cannot be reset",
+ name)));

ERRCODE_FEATURE_NOT_SUPPORTED doesn't look proper for the case. Isn't
it ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE or something like?

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-03-14 13:45:17 Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end
Previous Message Masahiko Sawada 2022-03-14 08:12:18 Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end