1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Allow loadable modules to create PGC_POSTMASTER GUC variables, but only

when loaded via shared_preload_libraries.  Needed for support of
pg_stat_statements, or pretty much anything else that wants a GUC to
control size of a shared memory allocation.
This commit is contained in:
Tom Lane
2009-01-03 20:03:08 +00:00
parent dad75a62bf
commit 4605d1c98b
3 changed files with 29 additions and 4 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.170 2009/01/01 17:23:51 momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/init/miscinit.c,v 1.171 2009/01/03 20:03:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1131,6 +1131,9 @@ ValidatePgVersion(const char *path)
char *shared_preload_libraries_string = NULL;
char *local_preload_libraries_string = NULL;
/* Flag telling that we are loading shared_preload_libraries */
bool process_shared_preload_libraries_in_progress = false;
/*
* load the shared libraries listed in 'libraries'
*
@ -1197,9 +1200,11 @@ load_libraries(const char *libraries, const char *gucname, bool restricted)
void
process_shared_preload_libraries(void)
{
process_shared_preload_libraries_in_progress = true;
load_libraries(shared_preload_libraries_string,
"shared_preload_libraries",
false);
process_shared_preload_libraries_in_progress = false;
}
/*