[pgsql-jp: 33468] Re: pgpoolでsecondary

nishio @ aileck.co.jp nishio @ aileck.co.jp
2004年 7月 2日 (金) 11:04:47 JST


西尾です。

> 確認ですが,7.5.3ではなくて,7.4.3ですよね?まだ7.5はリリースされてま
> せんから...

すみません、間違えてました。
正確には、
 PostgreSQL 7.3.6 on sparc-sun-solaris2.8, compiled by GCC gcc (GCC) 3.3.2
です。

> もし,複数のセッションを同時に走らせ,それぞれ削除,更新をしていたとす
> ると,これは起こり得ます.というのも,pgpoolでは同じセッションの中では
> (strict modeならば)必ずmasterのクエリが実行されてからsecondaryのクエリ
> が実行されることが保証されているものの,異なるセッションの間ではそうい
> う保証はないからです.

データベースの不整合の再現に手間取っており返事が遅くなりました。
で、不整合の原因ですが、データ登録時にチェックとしてpsqlの操作を行っていた
事が原因のようです。やっていたのはSELECTだけですが、こういうことが起こるん
ですね。

単純に非公開のサーバで、ブラウザからCSVをアップロードしてファイルの内容を
データベースに登録しているだけなので複数のセッションが同時に走っているとは
考えにくいですし。

それで、不整合のある状態でパッチを当てたpgpoolを使用してみましたが、状況は
前回と変わりませんでした。そのときのpgpoolのログは以下の通りです。


DEBUG: pid 438: read kind from backend pending data D len: 79 po: 943
DEBUG: pid 438: AsciiRow: len:3 data: 00
DEBUG: pid 438: AsciiRow: len:10 data: 2003-07-1
DEBUG: pid 438: AsciiRow: len:6 data: 20913
log: pid 438: AsciiRow: 3 th field size does not match between master(5) and secondary(7)
DEBUG: pid 438: AsciiRow: len:1 data:
log: pid 438: AsciiRow: 6 th field size does not match between master(20) and secondary(5)
DEBUG: pid 438: AsciiRow: len:16 data: バラ 1000g×
log: pid 438: AsciiRow: 7 th field size does not match between master(9) and secondary(6)
DEBUG: pid 438: AsciiRow: len:5 data: 187.
log: pid 438: AsciiRow: 8 th field size does not match between master(6) and secondary(8)
DEBUG: pid 438: AsciiRow: len:2 data:
log: pid 438: AsciiRow: 9 th field size does not match between master(8) and secondary(12)
DEBUG: pid 438: AsciiRow: len:4 data: T00
log: pid 438: AsciiRow: 10 th field size does not match between master(12) and secondary(5)
DEBUG: pid 438: AsciiRow: len:8 data: 池田医
煙og: pid 438: AsciiRow: 11 th field size does not match between master(11) and secondary(22)
DEBUG: pid 438: AsciiRow: len:7 data: 1406.2
ERROR: pid 438: pool_process_query: kind does not match between backends master() secondary(D)

エラー出力が余りにも多いので最後の方だけです。




pgsql-jp メーリングリストの案内