[Pgpool-general] Parallel Query mode, trying to make inserts
Yoshiharu Mori
y-mori at sraoss.co.jp
Mon Jan 7 04:11:58 UTC 2008
Hi.
> Has anyone got this error?
>
> ERROR: pgpool2 sql restriction
> DETAIL: cannot use SelectStmt in InsertStmt
This is the BUG in parallel mode.
Please try this patch.
http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgpool/pgpool-II/pool_rewrite_query.c.diff?r1=1.7&r2=1.8&f=u
>
> I have pgpool setup and running connecting to 3 backend servers. I have no
> problem running DDL queries such as creating tables and functions. I also
> have inserted the appropriate records in pgpool_catalog.dist_def and
> pgpool_catalog.replicate_def tables on the system db.
>
> But when I run the command:
> INSERT INTO test(test_id,test_val) VALUES (1,'be1');
> I get the aforementioned error.
>
> My test table is setup as such:
> CREATE TABLE test (test_id int, test_val character(10));
>
> My records in the system_db tables:
> INSERT INTO pgpool_catalog.dist_def VALUES
> ('test','public','test','test_id',ARRAY['test_id','test_val'],ARRAY['integer','character(10)'],'dist_def_test');
> INSERT INTO pgpool_catalog.replicate_def VALUES
> ('test','public','test',ARRAY['test_id','test_val'],ARRAY['integer','character(10)']);
>
> My distribution function is as follows:
> CREATE OR REPLACE FUNCTION pgpool_catalog.dist_def_test(val ANYELEMENT)
> RETURNS INTEGER AS '
> SELECT CASE WHEN $1 >= 0 and $1 < 10 THEN 0
> WHEN $1 >= 10 and $1 < 20 THEN 1
> WHEN $1 >= 20 and $1 < 30 THEN 2
> END' LANGUAGE SQL;
>
> I also only have parallel_query_mode set in my pgpool.conf file
>
> Please help, I really would be interested in using pgpool-II for my parallel
> query processing in PostgreSQL, but this is severely limiting my change of
> using it.
>
--
SRA OSS, Inc. Japan
Yoshiharu Mori <y-mori at sraoss.co.jp>
http://www.sraoss.co.jp/
More information about the Pgpool-general
mailing list