Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end
Dmitry Koval <d.koval@postgrespro.ru>
From: Dmitry Koval <d.koval@postgrespro.ru>
To: Dilip Kumar <dilipbalaut@gmail.com>,
Masahiko Sawada <sawada.mshk@gmail.com>
Cc: andrewbille@gmail.com,
PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-02-06T07:37:47Z
Lists: pgsql-bugs
> In if (source != PGC_S_DEFAULT) we are overwriting newval with
> conf->reset_val so I think we should free the newval or can we even
> avoid guc_strdup in case of (source != PGC_S_DEFAULT)?
I think we can not avoid guc_strdup in case of (source != PGC_S_DEFAULT)
because function call_string_check_hook() contains "free(*newval);" in
PG_CATCH-section.
Probably we should free the newval in block
+ if (source != PGC_S_DEFAULT)
+ {
+ /* Release newextra as we use reset_extra */
+ if (newextra)
+ free(newextra);
With best regards,
Dmitry Koval.
Commits
-
Renumber GUC flags for a bit more sanity.
- 7ac918ada003 16.0 landed
-
Introduce GUC_NO_RESET flag.
- 385366426511 16.0 landed