pgpool2.git / summary / log / commit / refs
commit cd7494c46c4146d0969ab837acc2fdc3e016c6d0
Author: Muhammad Usama <m.usama@gmail.com>
Date: Wed Apr 12 14:02:03 2017 +0000
Fix for 0000299: Errors on the reloading of configuration
Pgpool-II should load the hba_file after evaluating all the
command line options at startup.
It is wrong to load hba file before evaluating all the command line arguments,
because when the Pgpool-II is invoked with reload or stop options, all it needs
to do is to signal the running Pgpool-II and exit, So loading hba file for
Pgpool reload/stop is not only unnecessary but it also emits the misleading
WARNING message of "failed while loading hba configuration" when alternative
path for hba file was used.
src/main/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/main.c b/src/main/main.c
index e3367aa7d..e8480c686 100644
--- a/src/main/main.c
+++ b/src/main/main.c
@@ -204,9 +204,6 @@ int main(int argc, char **argv)
if(debug_level > 0 && pool_config->log_min_messages > DEBUG1)
pool_config->log_min_messages = DEBUG1;
- if (pool_config->enable_pool_hba)
- load_hba(hba_file);
-
/*
* If a non-switch argument remains, then it should be either "reload" or "stop".
*/
@@ -271,6 +268,9 @@ int main(int argc, char **argv)
exit(1);
}
+ if (pool_config->enable_pool_hba)
+ load_hba(hba_file);
+
/* check effective user id for watchdog */
/* watchdog must be started under the privileged user */
wd_check_network_command_configurations();
[parent: 6eb7160c4565]