[pgsql-jp: 39390] Re: Q) pgpool-II について
User ken
ken @ tydfam.jp
2008年 5月 15日 (木) 18:03:36 JST
浅羽様。
早速のご回答ありがとうございます。
> 浅羽です。
> > ALTER TABLE
> > psql: xxx.db:334240: ERROR: insert or update on table "yyyyy" violates foreign key constraint "yyyy_zzz_number_fkey"
> > DETAIL: Key (zzz_number)=(19598) is not present in table "zzz".
>
> 残念ながらノードをまたいだ外部キー制約のチェックは対応できていません。
> 外部キーをはずしていただくか、必ず同じノード内に参照したいデータが入る
> ように分散ルールを記述してください。
DBの構成動作上から、ちょっとこの様なルールは現状では難しいので、少し考えてみます。
このエラーは最初の一つで出て、アボートするのですか? 一つしか出て来ていないので、、、。
>
> > 質問2)O/Rマッピング(seam/hibernate)を使っているのですが、下のようなSQLが実行されてエラーが出ます。 select 句に含まれない物を order句に入れているのが原因の様ですが、通常のpsqlやreplication modeでは問題なく実行できます。
> > また、単純に select * from xxx order by id; としても
> >
> > # select * from applications order by id;
> > ERROR: syntax error at or near ")"
> >
> > というエラーが出ます。dist_defの定義が間違っている、といった問題なのか、原因や解決方法を教えていただければ幸いです。
>
> pgpool-II のソースコードに付属しているサンプルで実験してみましたが、手
> 元では再現しませんでした。
>
pgpool -n でlog見ていても何も出てきませんが、同じエラーが出ます。applicationsは先の外部制約を多く含んでいるので、適当でないかもしれません。
ところで、parallel query では aliasを許していないのですか? 下記のようなエラーが出ますが、hibernate等のO/R mappingに使えない事になってしまいますが,,,。
xx =# select
xx -# distinct crops1_.id_crop as id1_15_,
xx -# crops1_.crop as crop15_,
xx -# crops1_.depth as depth15_,
xx -# crops1_.rank as rank15_
xx -# from
xx -# public.acis2crop_link acis2cropl0_
xx -# inner join
xx -# public.crops crops1_
xx -# on acis2cropl0_.id_crop=crops1_.id_crop,
xx -# public.acis_crop aciscrop3_
xx -# where
xx -# acis2cropl0_.id_acis=aciscrop3_.id_acis
xx -# and crops1_.depth>=8
xx -# and (
xx (# aciscrop3_.acis_crop like ('りんご'||'%')
xx (# );
ERROR: sql error
DETAIL: ERROR: missing FROM-clause entry for table "crops1_"
LINE 1: SELECT pool_parallel("SELECT crops1_.id_crop, crops1_.crop, ...
----- pgpool -n の出力(当該部分) ----
2008-05-15 18:21:12 LOG: pid 58644: connection received: host=192.168.1.3 port=43526
2008-05-15 18:21:12 LOG: pid 58644: statement: SELECT pool_parallel("SELECT crops1_.id_crop, crops1_.crop, crops1_.rank, crops1_.depth FROM public.crops WHERE ( (TRUE AND crops1_.depth>=8) AND TRUE)")
> pgpool-II 2.1 beta2 というのを今リリースしていますが、こちらを使うとい
> かがでしょうか?
実験してみます。
pgsql-jp メーリングリストの案内