Hi, I found a bug when playing with pgpool yesterday. The problem is that enabling debug_level to 1 into pgpool.conf doesn't has any effect as it is overriden in the main.c file after getting configuration so that it is only enabled when the -d command line option is present.
I've attach a patch for that. The other point I want to raise is that enabling debug level is only useful when pgpool is run with the -n (stay in foregroud) option because when stderr is redirected to a log file (like into the init script) we just catch the output of the main process and never the child's one. So in this case enabling debug_level or log_statement has strictly no effect. That's must be said somewhere has people may take a long time to understand why pgpool is not dumping statement in their log file. Fortunately we have syslog support now :-) but if we want to fix the stderr logging problem we have to allow pgpool to save it into a given file like with a -l logfile command line option or/and in the configuration file with a 'log_to_file' option instead of letting the user creating a shell redirection that is only useful at main process startup. Regards, -- Gilles Darold http://dalibo.com - http://dalibo.org
diff -r -u pgpool-II/main.c pgpool-II-debug/main.c --- pgpool-II/main.c 2010-12-30 01:47:05.000000000 +0100 +++ pgpool-II-debug/main.c 2010-12-30 09:56:07.908166004 +0100 @@ -343,7 +343,8 @@ /* * Override debug level */ - pool_config->debug_level = debug_level; + if (pool_config->debug_level == 0) + pool_config->debug_level = debug_level; if (pool_config->enable_pool_hba) load_hba(hba_file);
_______________________________________________ Pgpool-hackers mailing list [email protected] http://pgfoundry.org/mailman/listinfo/pgpool-hackers
