[Pgpool-general] Trouble with the JDBC drivers...

Bryan Varner bvarner at polarislabs.com
Tue Oct 25 14:47:59 UTC 2011


> Hmm. Question is why you get invalid portal name errors in the first
> place.

This only happened when the Execute() was being sent to the Master, 
after the Bind() had already been sent to the Slave.

>> I agree that the easiest fix here is to simply not invoke
>> pool_where_to_send for Bind or Execute, but to inherit where they were
>> Parse()ed at.
>>
>> I had been playing with the idea of re-parsing / re-binding statements
>> if there was a mismatch, but I'm not convinced it's the right thing to
>> do, or that the overhead would be worth it.
>
> Yeah, without dealing with the problem above, I'm afraid re-parsing /
> re-binding approach brings more troubles...

I'm attaching my java project that I've used for testing things.
This is really nasty, horrible code that doesn't even come close to best 
practices with JDBC -- I know...

But it does fairly reliably reproduce my problem. Sometimes it takes a 
few executions -- you're at the mercy of how pgpool assigns connections 
to backends.

I'm going to make the changes to pgpool (comment out the 
pool_where_to_send in Bind and Execute) and see if that fixes things -- 
I'll send another email with those results (sorry for the spam).

Regards,
-Bryan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool-buster.tar.gz
Type: application/x-gzip
Size: 2061 bytes
Desc: pgpool-buster.tar.gz
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20111025/926f7d06/attachment.bin>


More information about the Pgpool-general mailing list