[pgpool-general: 2383] Re: Error when use pgpool2 with JDBC

Tatsuo Ishii ishii at postgresql.org
Wed Jan 8 17:44:31 JST 2014


> Hello,
> 
> thanks for your help.
> I finally managed to use pgpool2 with JDBC. I replaced version 3.1.1
> from Ubuntu package by 3.3.2 I compiled, and I add in connection
> parameters protocol version 2.
> My program is not a web application with Tomcat or another servlet
> container, but a little test program written just to try pgpool. I use
> org.apache.commons.dbcp.BasicDataSource to connect and Spring
> templates to send query to database. Here my datasource bean :
> 
> <bean id="datasource" class="org.apache.commons.dbcp.BasicDataSource">
>     <property name="username" value="XXX" />
>     <property name="password" value="XXX" />
>     <property name="url" value="jdbc:postgresql://server/database" />
>     <property name="driverClassName" value="org.postgresql.Driver" />
>     <property name="connectionProperties" value="protocolVersion=2" />
> </bean>
> 
> By putting protocolVersion=2, that works, but now I 'm facing another
> problems : I have no load balancing, and for transaction, I cannot use
> read-only transaction with propagation required (I have to use
> propagation="SUPPORTS"). But may be these problems come from my
> program, and when I'll test later with a real web application they
> will disappear.

Protocol Version 2 does not support load balancing.

BTW,
>     PoolableConnectionFactory (ERROR: kind mismatch among
>     backends. Possible last query was: "SET extra_float_digits = 3" kind
>     details are: 0[N: execute <unnamed>: SET extra_float_digits = 3] 1[C]
>   Indice : check data consistency among db nodes)

It seems master node (0) emit a notice message, while node 1
doesn't. Is there any difference of log setting among master's
postgresql.conf and slave's postgresql.conf? I suspect log_statement
is only set in master node.
--
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