Fix some comments related to library unloading
authorMichael Paquier <[email protected]>
Mon, 23 Dec 2024 05:46:49 +0000 (14:46 +0900)
committerMichael Paquier <[email protected]>
Mon, 23 Dec 2024 05:46:49 +0000 (14:46 +0900)
Library unloading has never been supported with its code removed in
ab02d702ef08, and there were some comments still mentioning that it was
a possible operation.

ChangAo has noticed the incorrect references in dfmgr.c, while I have
noticed the other ones while scanning the rest of the tree for similar
mistakes.

Author: ChangAo Chen, Michael Paquier
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/[email protected]

contrib/auto_explain/auto_explain.c
contrib/passwordcheck/passwordcheck.c
contrib/pg_stat_statements/pg_stat_statements.c
contrib/sepgsql/hooks.c
src/backend/utils/fmgr/dfmgr.c

index f2eaa8e4949da9169eea3095c3427074743cb032..4d87ea808e793d023ff2a6201b2b1783dcd2f0d0 100644 (file)
@@ -70,7 +70,7 @@ static bool current_query_sampled = false;
     (nesting_level == 0 || auto_explain_log_nested_statements) && \
     current_query_sampled)
 
-/* Saved hook values in case of unload */
+/* Saved hook values */
 static ExecutorStart_hook_type prev_ExecutorStart = NULL;
 static ExecutorRun_hook_type prev_ExecutorRun = NULL;
 static ExecutorFinish_hook_type prev_ExecutorFinish = NULL;
index 0785618f2abbee56a596186349d0f92918c5c4df..b5d95b558e9f0ed46f53ab2d9d152cc35af6e23d 100644 (file)
@@ -26,7 +26,7 @@
 
 PG_MODULE_MAGIC;
 
-/* Saved hook value in case of unload */
+/* Saved hook value */
 static check_password_hook_type prev_check_password_hook = NULL;
 
 /* passwords shorter than this will be rejected */
index 602cae54ffd25afecb198f2e940aeb09c0118748..7b3dd137b8faf86500f10a81f3a37d3308b2da10 100644 (file)
@@ -256,7 +256,7 @@ typedef struct pgssSharedState
 /* Current nesting depth of planner/ExecutorRun/ProcessUtility calls */
 static int nesting_level = 0;
 
-/* Saved hook values in case of unload */
+/* Saved hook values */
 static shmem_request_hook_type prev_shmem_request_hook = NULL;
 static shmem_startup_hook_type prev_shmem_startup_hook = NULL;
 static post_parse_analyze_hook_type prev_post_parse_analyze_hook = NULL;
index 0f206b1093d816a2038b6b5ee3ed40152a0b9cce..edf5206aa8bd27c5bb6e78b5123288a92c00f61a 100644 (file)
@@ -394,7 +394,7 @@ sepgsql_utility_command(PlannedStmt *pstmt,
 }
 
 /*
- * Module load/unload callback
+ * Module load callback
  */
 void
 _PG_init(void)
index 8e81ecc7491e8b2cdb5aed9977fee824ad7b6404..8b7807472fd8dc9cc8bb9b08b3a798222aa512f8 100644 (file)
@@ -125,7 +125,7 @@ load_external_function(const char *filename, const char *funcname,
 /*
  * This function loads a shlib file without looking up any particular
  * function in it.  If the same shlib has previously been loaded,
- * unload and reload it.
+ * we do not load it again.
  *
  * When 'restricted' is true, only libraries in the presumed-secure
  * directory $libdir/plugins may be referenced.
@@ -142,7 +142,7 @@ load_file(const char *filename, bool restricted)
    /* Expand the possibly-abbreviated filename to an exact path name */
    fullname = expand_dynamic_library_name(filename);
 
-   /* Load the shared library */
+   /* Load the shared library, unless we already did */
    (void) internal_load_library(fullname);
 
    pfree(fullname);