1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-14 08:21:07 +03:00

Add a feature for automatic initialization and finalization of dynamically

loaded libraries: call functions _PG_init() and _PG_fini() if the library
defines such symbols.  Hence we no longer need to specify an initialization
function in preload_libraries: we can assume that the library used the
_PG_init() convention, instead.  This removes one source of pilot error
in use of preloaded libraries.  Original patch by Ralf Engelschall,
preload_libraries changes by me.
This commit is contained in:
Tom Lane
2006-08-08 19:15:09 +00:00
parent e00664da48
commit b09bfcaa57
12 changed files with 179 additions and 239 deletions

View File

@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.497 2006/07/29 03:02:55 tgl Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.498 2006/08/08 19:15:07 tgl Exp $
*
* NOTES
*
@ -197,9 +197,6 @@ bool Db_user_namespace = false;
char *bonjour_name;
/* list of library:init-function to be preloaded */
char *preload_libraries_string = NULL;
/* PIDs of special child processes; 0 when not running */
static pid_t StartupPID = 0,
BgWriterPID = 0,
@ -710,11 +707,9 @@ PostmasterMain(int argc, char *argv[])
#endif
/*
* process any libraries that should be preloaded and optionally
* pre-initialized
* process any libraries that should be preloaded at postmaster start
*/
if (preload_libraries_string)
process_preload_libraries(preload_libraries_string);
process_preload_libraries();
/*
* Remove old temporary files. At this point there can be no other