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)

Reply via email to