[pgsql-jp: 34872] Re: pgpoolで決まったレコードだけエラー

Tatsuo Ishii t-ishii @ sra.co.jp
2005年 2月 11日 (金) 17:00:58 JST


石井です.

> 内田です。
> 
> 現在 FreeBSD 4.X, PostgreSQL 7.X, PHP 4.X で動いているシステムを、
> FreeBSD 5.3, PostgreSQL 8.0.1 上で動作テストをしており、ついでに
> (といっては悪いですが)pgpool を加えたとき、pgpool 経由で接続した
> 場合だけ、特定の結果が検索できない状況が発生しました。
> 
> どうも、一定以上のサイズのデータを返そうとすると、エラーになるよう
> です。
> 
> これは、なにかのパラメータで調整できますか? pgpool のバージョンは
> 2.5 で、pgpool.conf は sample そのままです。
> 
> 最初、apache+php 経由で特定の行だけデータが出ないので、どうしたのか
> と思ったのですが、psql で単純な query を
> 
> $ psql db
> db=# select * from infodata where id=1530;
> ... 正常に検索される
> 
> $ psql -p 9999 db
> www=# select * from myshop_info where id=1530;
> server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
> The connection to the server was lost. Attempting reset: Succeeded.
> 
> となり、検索できません。
> 
> このとき、pgpool の Error は以下が出ます。
> 
>  ERROR: pid 95526: pool_flush: fflush failed (Resource temporarily unavailable)
> 
> この行は、他の行と比べて少しデータが大きいのが原因のようで、全部のデータを出さ
> なければ正常に動きます。
> 
> www=# select id from infodata where id=1530;
>   id
> ------
>  1530
> (1 row)
> 
> しかし、8k バイトほどの文字列が入った text のフィールドを出すとダメです。
> 
> www=# select text_field from infodata where id=1530;
> server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
> The connection to the server was lost. Attempting reset: Succeeded.

うーん,Linuxでは再現しないようです.

create table t1(t text);
insert into t1 values(repeat('abc',1000));
 select length(t) from t1;
 length 
--------
   3000

select * from t1;
abcabc...(以下略)

hostA: psql->pgpool
hostB: postmaster

のパターンと,

hostA: >pgpool
hostB: psql, postmaster

の両方を試しましたが,どちらも正常に動きました.もしかして,FreeBSDの
stdioライブラリは8kバイト以上のバッファリングに対応していないのでしょ
うか?
--
Tatsuo Ishii



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