[Pgpool-general] SQL statements not printed in pgpool log
Tatsuo Ishii
ishii at sraoss.co.jp
Tue Aug 24 08:23:30 UTC 2010
> Any ideas/suggestions?
>
> -----Original Message-----
> From: pgpool-general-bounces at pgfoundry.org
> [mailto:pgpool-general-bounces at pgfoundry.org] On Behalf Of Gnanakumar
> Sent: Tuesday, August 10, 2010 5:55 PM
> To: pgpool-general at pgfoundry.org
> Subject: [Pgpool-general] SQL statements not printed in pgpool log
>
> Hi,
>
> Our production server is running PostgreSQL 8.2.3 and pgpool-II-2.0.1.
> Recently, we upgraded our JDBC driver 2 to JDBC driver 4.
> After changing JDBC driver, I'm not able to see none of the SQL statements
> printed in pgpool log. What's going wrong?
> Instead of SQL statements, I can see only the following lines:
>
> 2010-08-09 20:22:20 LOG: pid 20794: YYYYY
> 2010-08-09 20:22:20 LOG: pid 20794: YYYYY
> 2010-08-09 20:22:20 LOG: pid 20794: YYYYY
>
> If I use JDBC driver 2, I don't have this problem.
>
> How do I fix this issue, so that SQL statements are also printed in the log.
2.0.1 is pretty old and my memory about it had almost gone:-)
Anyway...
> 2010-08-09 20:22:20 LOG: pid 20794: YYYYY
This is a debug statement and someone forgot to remove it. You can
safely remove this by changing following (line 3898 in
pool_process_query.c)
pool_log("YYYYY");
to
pool_debug("YYYYY");
Next. The reason why you do not see the statement log is, JDBC 4 uses
"extended query" which is totaly different method from JDBC 2
uses. Pgpool-II 2.0.1 was not able to log the statement of the
extended query. Fix will be simple though I have not tested it:
Insert followins after line 1586 of pool_process_query.c:
if (pool_config->log_statement)
{
pool_log("statement: %s", stmt);
}
Hope this helps,
--
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-general
mailing list