[pgpool-general: 5136] Re: Python + psycopg2 works. Java with JDBC doesn't

Felipe Garcia felipecpg at gmail.com
Tue Nov 22 16:58:58 JST 2016


Reading the postgres jdbc driver documentation on github I was able to make it run in simple query mode, and my java program worked.

I am no using prepared statements in my Java sample code, and as far as I remember, I also tried using prepared statements with pgpool 3.5.4 for the inserts and it didn't work either - I am gonna try to run it again with pgpool 3.6 and prepared statements and then let you know what I've got.

Thanks,

Felipe

Sent from my iPhone

> On 22 Nov 2016, at 04:53, Сергей Мелехин <cpro29a at gmail.com> wrote:
> 
> "portal does not exist" hints on some problem with prepared statements.
> Can we have a look on your code that does this insert, and pgpool.conf?
> 
> С Уважением, Сергей Мелехин.
> 
> 2016-11-22 7:00 GMT+10:00 Felipe Garcia <felipecpg at gmail.com>:
>> Hi,
>> 
>> Thanks for letting me know. What would be the alternatives in this case? Are there any way of using JDBC and not using extended protocol?
>> 
>> I've justed tested the new pgpool 3.6.0 and the problem persists. Here are the logs for pgpool https://gist.github.com/rhossi/8ae15ca541d6699df6c141877a65bd39
>> 
>> Thanks,
>> 
>> Felipe
>> 
>> 
>> 
>> 
>> Felipe Garcia
>> +55 (11) 98899-6065
>> Aviso: Geralmente, email é a melhor forma de me encontrar. Eu tentarei responder a sua mensagem o mais rápido possível.
>> Note: Generally, email is the best way to reach me.  I will respond to your message as soon as possible
>> 
>> 
>>> On Mon, Nov 21, 2016 at 1:16 AM, Сергей Мелехин <cpro29a at gmail.com> wrote:
>>> Hi, Felipe!
>>> JDBC (and py-postgresql) uses so called extended protocol, while psycopg uses generic one.
>>> Anyway it would be helpful to see pgpool.log. This traceback and error message do not have enough details about error.
>>> 
>>> С Уважением, Сергей Мелехин.
>>> 
>>> 2016-11-21 1:02 GMT+10:00 Felipe Garcia <felipecpg at gmail.com>:
>>>> I set up a pgoool (3.5.4) environment using the standard pgpool.conf.sample-replication configuration, and I was using a Java application to connect to it.
>>>> 
>>>> The Java app using JDBC, doesn't work. It gives me the following error https://gist.github.com/rhossi/c105fdee67b2ae6a0e89a89ca0b6971d
>>>> 
>>>> In the pgpool log, I have this log https://gist.github.com/rhossi/acb85d5d578484c38bf9baccf2182213
>>>> 
>>>> I've wrote a Python application using the package psycopg2 (which uses libpq), and with this program I am able to successfully connect.
>>>> 
>>>> Most strange is, I think there might be a bug in pgpool. If I start pgppool and run the Java application, I get the error above. But If I start pgpool, and run the Python app a couple of times, and then run the Java app, the Java app works.
>>>> 
>>>> The code for the Java Application - https://gist.github.com/rhossi/b10c0cd20ac0284d758da405886a0320
>>>> 
>>>> The code for the Python application
>>>> - https://gist.github.com/rhossi/98004f6e62795b67cb84997d8d4d2250
>>>> 
>>>> Can someone help me, please?
>>>> 
>>>> Thanks,
>>>> 
>>>> Felipe Garcia
>>>> +55 (11) 98899-6065
>>>> Aviso: Geralmente, email é a melhor forma de me encontrar. Eu tentarei responder a sua mensagem o mais rápido possível.
>>>> Note: Generally, email is the best way to reach me.  I will respond to your message as soon as possible
>>>> 
>>>> 
>>>> _______________________________________________
>>>> pgpool-general mailing list
>>>> pgpool-general at pgpool.net
>>>> http://www.pgpool.net/mailman/listinfo/pgpool-general
>>>> 
>>> 
>> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20161122/dbe1ad77/attachment-0001.html>


More information about the pgpool-general mailing list