[Pgpool-general] Is pgpool compatible with protocolVersion=3 of jdbc?

Nimesh Satam nimesh.satam at gmail.com
Mon Aug 31 05:57:22 UTC 2009


Tatsuo,

The queries work fine if you run them directly through the psql prompt. They
fail only when they are run from the java application.

We also tried running the same set of queries using perl, and they work
fine.

This seems to be some kind of problem between jdbc and pgpool.

Regards,
Nimesh.


On 8/30/09, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
>
> I set up master/slave mode with pgpool-II 2.2.4 and PostgreSQL
> 8.4.0. and I ran your example query using psql:
>
> test=# CREATE TEMP TABLE tmp_ch (key integer PRIMARY KEY);
> NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
> "tmp_ch_pkey" for table "tmp_ch"
> CREATE TABLE
> test=# INSERT INTO tmp_ch (key) SELECT key FROM rpt_ch WHERE id IN
> (135848,135841);
> INSERT 0 2
>
> I see no errors so far. Has anybody have same problem with Nimesh?
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
>
> > Hi Tatsuo,
> >
> > Can you please let us know what might be going wrong here or if you need
> any
> > further information?
> >
> > Regards,
> > Nimesh.
> >
> > On Wed, Aug 26, 2009 at 10:07 AM, Nimesh Satam <nimesh.satam at gmail.com
> >wrote:
> >
> > > Tatsuo,
> > >
> > > >> What error do you have with temp table creation?
> > >
> > > When we try to create temp table using pgpool, the application fails
> with
> > > below error:
> > >
> > > *"ERROR: kind mismatch among backends. Possible last query was: "..."
> kind
> > > details are: 0[1] 1[E]" error.*
> > >
> > > We are using pgpool in master-slave mode and loadbalance=on.
> > >
> > > On execution of the below queries the above error appears:
> > >
> > > *1) CREATE TEMP TABLE tmp_ch (key integer PRIMARY KEY); *
> > >
> > > *2) INSERT INTO tmp_ch (key) SELECT key FROM rpt_ch WHERE id IN
> (135848,
> > > 135841);*
> > >
> > > Note: in logs we see the first query getting Parsed on master and slave
> > > database. But the execute is done only on slave. As a result the 2
> query
> > > fails.
> > >
> > > Let me know if you need any information
> > >
> > > Regards,
> > > Nimesh.
> > >
> > >
> > >
> > > On Wed, Aug 26, 2009 at 5:52 AM, Tatsuo Ishii <ishii at sraoss.co.jp>
> wrote:
> > >
> > >> > Is there any significant difference in using pg connection string
> > >> > "protocolVersion=2"?
> > >> >
> > >> > By default pg driver uses protocol V3, this causes the temp table
> > >> creation
> > >> > from application to fail.
> > >>
> > >> What error do you have with temp table creation?
> > >>
> > >> > If we change the connection string to
> > >> > "protocolVersion=2" everything works fine
> > >> >
> > >> > eg: Connection c =
> > >> >
> > >>
> DriverManager.getConnection("jdbc:postgresql://db_host:db_port/reporting?protocolVersion=2","car",
> > >> > "");
> > >> >
> > >> > Is there any negative impact of using protocolversion 2.
> > >>
> > >> Yes. Protocolversion 2 is inefficient comparing with 3. Also you will
> > >> lose some important features those are available with only 3. For
> > >> example, load balance, insert lock etc.
> > >> --
> > >> Tatsuo Ishii
> > >> SRA OSS, Inc. Japan
> > >>
> > >
> > >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20090831/bd5f4441/attachment.html>


More information about the Pgpool-general mailing list