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.
pool_config->logsyslog = 1;
}
- if (pool_config->enable_pool_hba)
- load_hba(hba_file);
-
/*
* If a non-switch argument remains, then it should be either "reload" or "stop".
*/
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 */
if (pool_config->use_watchdog )