Skip to content

Commit 7f97b47

Browse files
committed
Fix some comments related to library unloading
Library unloading has never been supported with its code removed in ab02d70, 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/tencent_1D09840A1632D406A610C8C4E2491D74DB0A@qq.com
1 parent 578a7fe commit 7f97b47

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

contrib/auto_explain/auto_explain.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static bool current_query_sampled = false;
7070
(nesting_level == 0 || auto_explain_log_nested_statements) && \
7171
current_query_sampled)
7272

73-
/* Saved hook values in case of unload */
73+
/* Saved hook values */
7474
static ExecutorStart_hook_type prev_ExecutorStart = NULL;
7575
static ExecutorRun_hook_type prev_ExecutorRun = NULL;
7676
static ExecutorFinish_hook_type prev_ExecutorFinish = NULL;

contrib/passwordcheck/passwordcheck.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
PG_MODULE_MAGIC;
2828

29-
/* Saved hook value in case of unload */
29+
/* Saved hook value */
3030
static check_password_hook_type prev_check_password_hook = NULL;
3131

3232
/* passwords shorter than this will be rejected */

contrib/pg_stat_statements/pg_stat_statements.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ typedef struct pgssSharedState
256256
/* Current nesting depth of planner/ExecutorRun/ProcessUtility calls */
257257
static int nesting_level = 0;
258258

259-
/* Saved hook values in case of unload */
259+
/* Saved hook values */
260260
static shmem_request_hook_type prev_shmem_request_hook = NULL;
261261
static shmem_startup_hook_type prev_shmem_startup_hook = NULL;
262262
static post_parse_analyze_hook_type prev_post_parse_analyze_hook = NULL;

contrib/sepgsql/hooks.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ sepgsql_utility_command(PlannedStmt *pstmt,
394394
}
395395

396396
/*
397-
* Module load/unload callback
397+
* Module load callback
398398
*/
399399
void
400400
_PG_init(void)

src/backend/utils/fmgr/dfmgr.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ load_external_function(const char *filename, const char *funcname,
125125
/*
126126
* This function loads a shlib file without looking up any particular
127127
* function in it. If the same shlib has previously been loaded,
128-
* unload and reload it.
128+
* we do not load it again.
129129
*
130130
* When 'restricted' is true, only libraries in the presumed-secure
131131
* directory $libdir/plugins may be referenced.
@@ -142,7 +142,7 @@ load_file(const char *filename, bool restricted)
142142
/* Expand the possibly-abbreviated filename to an exact path name */
143143
fullname = expand_dynamic_library_name(filename);
144144

145-
/* Load the shared library */
145+
/* Load the shared library, unless we already did */
146146
(void) internal_load_library(fullname);
147147

148148
pfree(fullname);

0 commit comments

Comments
 (0)