Remove unneeded volatile qualifier in fmgr.c.
authorNathan Bossart <nathan@postgresql.org>
Wed, 12 Feb 2025 21:45:40 +0000 (15:45 -0600)
committerNathan Bossart <nathan@postgresql.org>
Wed, 12 Feb 2025 21:45:40 +0000 (15:45 -0600)
Currently, the save_nestlevel variable in fmgr_security_definer()
is marked volatile.  While this may have been necessary when it was
used in a PG_CATCH section (as explained in the comment for PG_TRY
in elog.h), it appears to have been unnecessary since commit
82a47982f3, which removed its use in a PG_CATCH section.

Author: Julien Rouhaud <rjuju123@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/Z6xbAgXKY2L-3d5Q%40jrouhaud

src/backend/utils/fmgr/fmgr.c

index aa89ae8fe1ae924217066c63d4b9735366daf635..782291d99983203ba134cc0d783a77419a7d41ed 100644 (file)
@@ -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)