[Pgpool-hackers] Found bug with debug_level

Tatsuo Ishii ishii at sraoss.co.jp
Thu Dec 30 13:03:28 UTC 2010


> 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.

Thanks for pointing it out. I will commit this.

> 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.

Problem with this aproach is we need a rog rotation functionality at
the same time. Otherwise the logfile will become infinitely large
until pgpool process restarts. IMO if we implement "log_to_file", we
need our own log rotator as well. Probably these functions will be
pretty much similar to PostgreSQL's one(aka. logging collector
process) if we want to implement.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


More information about the Pgpool-hackers mailing list