[Pgpool-general] Trouble with the JDBC drivers...
Bryan Varner
bvarner at polarislabs.com
Fri Oct 21 16:20:19 UTC 2011
>> If I could get master_slave&& load_balance working with the JDBC
>> drivers, this would be an incredible tool to have.
>>
> Is autocommit setting of your application true?
> If so, can you set autocommit to false by using setAutoCommit(false)?
>
Your suggestion is the opposite of what the pgpool documentation states:
"Note: the JDBC driver has an autocommit option. If autocommit is
false, the JDBC driver sends "BEGIN" and "COMMIT" by itself. So pgpool
cannot do any load balancing. You need to call setAutoCommit(true) to
enable autocommit."
I have tried both methods (with load_balance off) and still get the same
results. The standby is only receiving BEGIN and COMMIT/ROLLBACK statements.
My application is currently using c3p0, and I'm doing
setAutoCommit(false/true) with a connection customizer class. Is there a
recommended java connection pool to use outside of a j2ee container with
pgpool? Has anyone else reported success getting selects sent to the
standby server with dbcp or even the postgres jdbc driver connection pool?
Regards,
-Bryan
More information about the Pgpool-general
mailing list