mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Fix some comments related to library unloading
Library unloading has never been supported with its code removed in
ab02d702ef
, 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
This commit is contained in:
@ -70,7 +70,7 @@ static bool current_query_sampled = false;
|
|||||||
(nesting_level == 0 || auto_explain_log_nested_statements) && \
|
(nesting_level == 0 || auto_explain_log_nested_statements) && \
|
||||||
current_query_sampled)
|
current_query_sampled)
|
||||||
|
|
||||||
/* Saved hook values in case of unload */
|
/* Saved hook values */
|
||||||
static ExecutorStart_hook_type prev_ExecutorStart = NULL;
|
static ExecutorStart_hook_type prev_ExecutorStart = NULL;
|
||||||
static ExecutorRun_hook_type prev_ExecutorRun = NULL;
|
static ExecutorRun_hook_type prev_ExecutorRun = NULL;
|
||||||
static ExecutorFinish_hook_type prev_ExecutorFinish = NULL;
|
static ExecutorFinish_hook_type prev_ExecutorFinish = NULL;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
PG_MODULE_MAGIC;
|
PG_MODULE_MAGIC;
|
||||||
|
|
||||||
/* Saved hook value in case of unload */
|
/* Saved hook value */
|
||||||
static check_password_hook_type prev_check_password_hook = NULL;
|
static check_password_hook_type prev_check_password_hook = NULL;
|
||||||
|
|
||||||
/* passwords shorter than this will be rejected */
|
/* passwords shorter than this will be rejected */
|
||||||
|
@ -256,7 +256,7 @@ typedef struct pgssSharedState
|
|||||||
/* Current nesting depth of planner/ExecutorRun/ProcessUtility calls */
|
/* Current nesting depth of planner/ExecutorRun/ProcessUtility calls */
|
||||||
static int nesting_level = 0;
|
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_request_hook_type prev_shmem_request_hook = NULL;
|
||||||
static shmem_startup_hook_type prev_shmem_startup_hook = NULL;
|
static shmem_startup_hook_type prev_shmem_startup_hook = NULL;
|
||||||
static post_parse_analyze_hook_type prev_post_parse_analyze_hook = NULL;
|
static post_parse_analyze_hook_type prev_post_parse_analyze_hook = NULL;
|
||||||
|
@ -394,7 +394,7 @@ sepgsql_utility_command(PlannedStmt *pstmt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Module load/unload callback
|
* Module load callback
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
_PG_init(void)
|
_PG_init(void)
|
||||||
|
@ -125,7 +125,7 @@ load_external_function(const char *filename, const char *funcname,
|
|||||||
/*
|
/*
|
||||||
* This function loads a shlib file without looking up any particular
|
* This function loads a shlib file without looking up any particular
|
||||||
* function in it. If the same shlib has previously been loaded,
|
* 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
|
* When 'restricted' is true, only libraries in the presumed-secure
|
||||||
* directory $libdir/plugins may be referenced.
|
* 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 */
|
/* Expand the possibly-abbreviated filename to an exact path name */
|
||||||
fullname = expand_dynamic_library_name(filename);
|
fullname = expand_dynamic_library_name(filename);
|
||||||
|
|
||||||
/* Load the shared library */
|
/* Load the shared library, unless we already did */
|
||||||
(void) internal_load_library(fullname);
|
(void) internal_load_library(fullname);
|
||||||
|
|
||||||
pfree(fullname);
|
pfree(fullname);
|
||||||
|
Reference in New Issue
Block a user