mirror of
https://github.com/postgres/postgres.git
synced 2025-04-24 10:47:04 +03:00
Lessen library-loading log level.
Previously, messages were emitted at the LOG level every time a backend preloaded a library. That was acceptable (though unnecessary) for shared_preload_libraries; but it was excessive for local_preload_libraries and session_preload_libraries. Reduce to DEBUG1. Also, there was logic in the EXEC_BACKEND case to avoid repeated messages for shared_preload_libraries by demoting them to DEBUG2. DEBUG1 seems more appropriate there, as well, so eliminate that special case. Peter Geoghegan.
This commit is contained in:
parent
36a3be6540
commit
559d535819
@ -1240,7 +1240,6 @@ load_libraries(const char *libraries, const char *gucname, bool restricted)
|
|||||||
{
|
{
|
||||||
char *rawstring;
|
char *rawstring;
|
||||||
List *elemlist;
|
List *elemlist;
|
||||||
int elevel;
|
|
||||||
ListCell *l;
|
ListCell *l;
|
||||||
|
|
||||||
if (libraries == NULL || libraries[0] == '\0')
|
if (libraries == NULL || libraries[0] == '\0')
|
||||||
@ -1262,18 +1261,6 @@ load_libraries(const char *libraries, const char *gucname, bool restricted)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Choose notice level: avoid repeat messages when re-loading a library
|
|
||||||
* that was preloaded into the postmaster. (Only possible in EXEC_BACKEND
|
|
||||||
* configurations)
|
|
||||||
*/
|
|
||||||
#ifdef EXEC_BACKEND
|
|
||||||
if (IsUnderPostmaster && process_shared_preload_libraries_in_progress)
|
|
||||||
elevel = DEBUG2;
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
elevel = LOG;
|
|
||||||
|
|
||||||
foreach(l, elemlist)
|
foreach(l, elemlist)
|
||||||
{
|
{
|
||||||
char *tok = (char *) lfirst(l);
|
char *tok = (char *) lfirst(l);
|
||||||
@ -1291,7 +1278,7 @@ load_libraries(const char *libraries, const char *gucname, bool restricted)
|
|||||||
filename = expanded;
|
filename = expanded;
|
||||||
}
|
}
|
||||||
load_file(filename, restricted);
|
load_file(filename, restricted);
|
||||||
ereport(elevel,
|
ereport(DEBUG1,
|
||||||
(errmsg("loaded library \"%s\"", filename)));
|
(errmsg("loaded library \"%s\"", filename)));
|
||||||
pfree(filename);
|
pfree(filename);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user