public inbox for [email protected]
help / color / mirror / Atom feedFrom: Julien Rouhaud <[email protected]>
To: [email protected]
Subject: Unneeded volatile qualifier in fmgr.c
Date: Wed, 12 Feb 2025 16:25:38 +0800
Message-ID: <Z6xbAgXKY2L-3d5Q@jrouhaud> (raw)
Hi,
While reading some code in fmgr.c I noticed that the save_nestlevel variable is
declared as volatile. I'm assuming that's because a long time ago it was
modified in the PG_TRY / PG_CATCH block but it doesn't look needed anymore.
Trivial patch attached.
diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c
index aa89ae8fe1a..ef0fde51b38 100644
--- a/src/backend/utils/fmgr/fmgr.c
+++ b/src/backend/utils/fmgr/fmgr.c
@@ -639,7 +639,7 @@ fmgr_security_definer(PG_FUNCTION_ARGS)
ListCell *lc1,
*lc2,
*lc3;
- volatile int save_nestlevel;
+ int save_nestlevel;
PgStat_FunctionCallUsage fcusage;
if (!fcinfo->flinfo->fn_extra)
Attachments:
[text/plain] fmgr_volatile.diff (414B, ../Z6xbAgXKY2L-3d5Q@jrouhaud/2-fmgr_volatile.diff)
download | inline diff:
diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c
index aa89ae8fe1a..ef0fde51b38 100644
--- a/src/backend/utils/fmgr/fmgr.c
+++ b/src/backend/utils/fmgr/fmgr.c
@@ -639,7 +639,7 @@ fmgr_security_definer(PG_FUNCTION_ARGS)
ListCell *lc1,
*lc2,
*lc3;
- volatile int save_nestlevel;
+ int save_nestlevel;
PgStat_FunctionCallUsage fcusage;
if (!fcinfo->flinfo->fn_extra)
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Unneeded volatile qualifier in fmgr.c
In-Reply-To: <Z6xbAgXKY2L-3d5Q@jrouhaud>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox