[pgpool-general: 1182] Re: JDBC question about parallel query mode

Tatsuo Ishii ishii at postgresql.org
Wed Nov 14 17:39:18 JST 2012


Sorry for delay. It's restriction of pgpool-II's parallel mode.
From the "Restriction" section of the doc:

	  Extended Query Protocol (for parallel mode)

	  The extended query protocol used by JDBC drivers, etc. is not
	  supported. The simple query protocol must be used. This means
	  you can't use prepared statements.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> Excuse me,
> 
> I'm new for pgpool-II.
> Here comes a trouble for me,about the diffenences between jdbc query and
> psql direct executing in parallel mode.
> I built my cluster in parallel mode,following the tutorial
> (
> http://pgpool.projects.postgresql.org/pgpool-II/doc/tutorial-ja.html#parallel)
> completely.
> 
> My 4 hosts showing as below:
> 
> pgpool-adm(pgpool-II installed ,working port 9999)
> backend-0(datanode 1 on port 5432)
> backend-1(datanode 2 on port 5432)
> backend-2(datanode 3 on port 5432).
> 
> For a distributed table,
> I can get the merged result set through the command lines in the host
> "pgpool-adm" with "psql" command:
> 
> [root at pgpool-adm ~]# psql -p 9999 -c "select BID,COUNT(*),MIN(aid),MAX(AID)
> from pgbench_accounts GROUP BY BID" bench_parallel -U postgres
>  bid | count  |  min   |  max
> -----+--------+--------+--------
>    1 | 100000 |      1 | 100000
>    3 | 100000 | 200001 | 300000
>    2 | 100000 | 100001 | 200000
> (3 rows)
> 
> 
> But in JDBC side(via DBVisualizer or Java programming),
> I can only get the result set from one node,just like psql on one of the
> backend nodes:
> 
> [root at pgpool-adm ~]# psql -h backend-2 -c "select
> BID,COUNT(*),MIN(aid),MAX(AID) from pgbench_accounts GROUP BY BID"
> bench_parallel -U postgres
>  bid | count  |  min   |  max
> -----+--------+--------+--------
>    2 | 100000 | 100001 | 200000
> (1 row)
> 
> It seems that the JDBC would random choose one among the 3 backend
> datanodes when building the db-connection,so I can only
> make query on just one node.
> 
> 
> In fact,JDBC is what I need...so can anyone help?
> anyone can catact me both in english or japanese.
> 
> By the way,the pgAdmin tool can't make connection to host "pgpool-adm" on
> 9999,just tells that "An error has occurred"⋯⋯
> 
> That's all.
> 
> 
> Thanks at first and best regards~
> 
> Herro


More information about the pgpool-general mailing list