Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end
Masahiko Sawada <sawada.mshk@gmail.com>
From: Masahiko Sawada <sawada.mshk@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Justin Pryzby <pryzby@telsasoft.com>, Tom Lane <tgl@sss.pgh.pa.us>, Dmitry Koval <d.koval@postgrespro.ru>, Dilip Kumar <dilipbalaut@gmail.com>,
andrewbille@gmail.com, pgsql-bugs@lists.postgresql.org, Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Date: 2022-09-22T02:03:24Z
Lists: pgsql-bugs
Attachments
- v5-0001-Introduce-GUC_NO_RESET-flag.patch (application/octet-stream) patch v5-0001
- v5-0002-Reorganize-GUC_XXX-flag-values.patch (application/octet-stream) patch v5-0002
On Fri, Jul 1, 2022 at 2:11 PM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > On Wed, Jun 29, 2022 at 3:48 PM Michael Paquier <michael@paquier.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
Commits
-
Renumber GUC flags for a bit more sanity.
- 7ac918ada003 16.0 landed
-
Introduce GUC_NO_RESET flag.
- 385366426511 16.0 landed