[pgsql-jp: 33537] Re: pgpool 2.0.2 報告
Tatsuo Ishii
t-ishii @ sra.co.jp
2004年 7月 7日 (水) 22:29:21 JST
石井です.
> > 西尾です。
>
> > 2.psqlのコンソールから、
> >
> > test02=# \d+ user_list
> > と入力すると、
> >
> > 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 -d -nで起動
> し,このエラーが起きた辺りのデバッグ出力を見せてもらえませんか?
このあたりを追っていて,V2.0.2でエンバグしているところを発見しました.
なんと,コネクションを再利用しようとすると必ず子プロセスが落ちてしまう
というバグです.実際には子プロセスが落ちても新しい子プロセスがすぐに追
加されるので,コネクションが再利用されず,性能が落ちる以外には弊害はな
いので気が付きませんでした.以下のパッチで直ると思います.
--
Tatsuo Ishii
*** child.c 4 Jul 2004 03:12:42 -0000 1.30
--- child.c 7 Jul 2004 12:40:50 -0000
***************
*** 243,256 ****
}
else
{
/* send reset request to backend */
! status = pool_process_query(frontend, backend, 1);
pool_close(frontend);
/* if we detect errors on resetting connection, we need to discard
*this connection since it might be in unknown status
*/
! if (status != POOL_CONTINUE)
pool_discard_cp(sp->user, sp->database, sp->major);
else
pool_connection_pool_timer(backend);
--- 243,258 ----
}
else
{
+ POOL_STATUS status1;
+
/* send reset request to backend */
! status1 = pool_process_query(frontend, backend, 1);
pool_close(frontend);
/* if we detect errors on resetting connection, we need to discard
*this connection since it might be in unknown status
*/
! if (status1 != POOL_CONTINUE)
pool_discard_cp(sp->user, sp->database, sp->major);
else
pool_connection_pool_timer(backend);
pgsql-jp メーリングリストの案内