[pgsql-jp: 33544] Re: pgpool 2.0.2 報告

nishio @ aileck.co.jp nishio @ aileck.co.jp
2004年 7月 8日 (木) 15:13:05 JST


西尾です。

>
>このあたりを追っていて,V2.0.2でエンバグしているところを発見しました.
>なんと,コネクションを再利用しようとすると必ず子プロセスが落ちてしまう
>というバグです.実際には子プロセスが落ちても新しい子プロセスがすぐに追
>加されるので,コネクションが再利用されず,性能が落ちる以外には弊害はな
>いので気が付きませんでした.以下のパッチで直ると思います.
>--
>Tatsuo Ishii
>
パッチを当てて動作確認しましたので報告します。
検証方法は、前回同様、\dコマンドでエラーを発生させました。
(\dは、やっぱりエラーになりますね。)
1回目は、問題なし。プロセス数は起動時と同数。
2回目以降は、回数は不確定だが、繰り返しているとプロセスが1つずつ消滅。

という結果でした。
そのときのデバッグモードでのログは次のとおりです.

DEBUG: pid 1707: read kind from frontend Q(51)
DEBUG: pid 1707: pool_read_string: read all from pending data. po:0 len:0
DEBUG: pid 1707: Query: SELECT c.oid,
  n.nspname,
  c.relname
FROM pg_catalog.pg_class c
     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE pg_catalog.pg_table_is_visible(c.oid)
      AND c.relname ~ '^bbb$'
ORDER BY 2, 3;
DEBUG: pid 1707: read kind from backend P
DEBUG: pid 1707: pool_read_string: read all from pending data. po:6 len:91
DEBUG: pid 1707: pool_read_string: read all from pending data. po:6 len:91
DEBUG: pid 1707: read kind from backend pending data T len: 90 po: 7
DEBUG: pid 1707: pool_read_string: read all from pending data. po:13 len:84
DEBUG: pid 1707: pool_read_string: read all from pending data. po:13 len:84
DEBUG: pid 1707: RowDescription: field size:4
DEBUG: pid 1707: pool_read_string: read all from pending data. po:31 len:66
DEBUG: pid 1707: pool_read_string: read all from pending data. po:31 len:66
DEBUG: pid 1707: RowDescription: field size:64
DEBUG: pid 1707: pool_read_string: read all from pending data. po:49 len:48
DEBUG: pid 1707: pool_read_string: read all from pending data. po:49 len:48
DEBUG: pid 1707: RowDescription: field size:64
DEBUG: pid 1707: read kind from backend pending data D len: 37 po: 60
DEBUG: pid 1707: AsciiRow: len:6 data: 36546
DEBUG: pid 1707: AsciiRow: len:6 data: publi
DEBUG: pid 1707: AsciiRow: len:3 data: bb
DEBUG: pid 1707: read kind from backend pending data C len: 8 po: 89
DEBUG: pid 1707: pool_read_string: read all from pending data. po:96 len:1
DEBUG: pid 1707: pool_read_string: read all from pending data. po:96 len:1
DEBUG: pid 1707: Complete Command Response: string: "SELECT"
DEBUG: pid 1707: read kind from backend pending data Z len: 0 po: 0
DEBUG: pid 1707: read kind from frontend Q(51)
DEBUG: pid 1707: pool_read_string: read all from pending data. po:0 len:0
DEBUG: pid 1707: Query: SELECT relhasindex, relkind, relchecks, reltriggers, relhasrules
FROM pg_catalog.pg_class WHERE oid = '365464'
DEBUG: pid 1707: read kind from backend P
DEBUG: pid 1707: pool_read_string: read all from pending data. po:6 len:143
DEBUG: pid 1707: pool_read_string: read all from pending data. po:6 len:116
DEBUG: pid 1707: read kind from backend pending data T len: 142 po: 7
DEBUG: pid 1707: pool_read_string: read all from pending data. po:21 len:128
DEBUG: pid 1707: pool_read_string: read all from pending data. po:21 len:101
DEBUG: pid 1707: RowDescription: field size:1
DEBUG: pid 1707: pool_read_string: read all from pending data. po:39 len:110
DEBUG: pid 1707: pool_read_string: read all from pending data. po:39 len:83
DEBUG: pid 1707: RowDescription: field size:1
DEBUG: pid 1707: pool_read_string: read all from pending data. po:59 len:90
DEBUG: pid 1707: pool_read_string: read all from pending data. po:59 len:63
DEBUG: pid 1707: RowDescription: field size:2
DEBUG: pid 1707: pool_read_string: read all from pending data. po:81 len:68
DEBUG: pid 1707: pool_read_string: read all from pending data. po:81 len:41
DEBUG: pid 1707: RowDescription: field size:2
DEBUG: pid 1707: pool_read_string: read all from pending data. po:103 len:46
DEBUG: pid 1707: pool_read_string: read all from pending data. po:103 len:19
DEBUG: pid 1707: RowDescription: field size:1
ERROR: pid 1707: pool_process_query: kind does not match between backends master(D) secondary(C)
LOG: pid 1707: do_child: exits with status 1 due to error
DEBUG: pid 1676: I am 1676 accept fd 6
DEBUG: pid 1676: Protocol Major: 2 Minor: 0 database: aaa user: postgres
DEBUG: pid 1676: connecting postmaster Unix domain socket: /tmp/.s.PGSQL.5432
DEBUG: pid 1676: connected to postmaster Unix domain socket: /tmp/.s.PGSQL.5432 fd: 7
DEBUG: pid 1676: read kind from backend pending data Z len: 0 po: 0
DEBUG: pid 1676: read kind from frontend Q(51)
DEBUG: pid 1676: pool_read_string: read all from pending data. po:0 len:0
DEBUG: pid 1676: Query: begin; select getdatabaseencoding(); commit
DEBUG: pid 1676: read kind from backend C
DEBUG: pid 1676: pool_read_string: read all from pending data. po:6 len:69
DEBUG: pid 1676: pool_read_string: read all from pending data. po:6 len:69
DEBUG: pid 1676: Complete Command Response: string: "BEGIN"
DEBUG: pid 1676: read kind from backend pending data P len: 68 po: 7
DEBUG: pid 1676: pool_read_string: read all from pending data. po:13 len:62
DEBUG: pid 1676: pool_read_string: read all from pending data. po:13 len:62
DEBUG: pid 1676: read kind from backend pending data T len: 61 po: 14
DEBUG: pid 1676: pool_read_string: read all from pending data. po:36 len:39
DEBUG: pid 1676: pool_read_string: read all from pending data. po:36 len:39
DEBUG: pid 1676: RowDescription: field size:64
DEBUG: pid 1676: read kind from backend pending data D len: 28 po: 47
DEBUG: pid 1676: AsciiRow: len:6 data: EUC_J
DEBUG: pid 1676: read kind from backend pending data C len: 16 po: 59
DEBUG: pid 1676: pool_read_string: read all from pending data. po:66 len:9
DEBUG: pid 1676: pool_read_string: read all from pending data. po:66 len:9
DEBUG: pid 1676: Complete Command Response: string: "SELECT"
DEBUG: pid 1676: read kind from backend pending data C len: 8 po: 67
DEBUG: pid 1676: pool_read_string: read all from pending data. po:74 len:1
DEBUG: pid 1676: pool_read_string: read all from pending data. po:74 len:1
DEBUG: pid 1676: Complete Command Response: string: "COMMIT"
DEBUG: pid 1676: read kind from backend pending data Z len: 0 po: 0

前回とは別のデータベースを作成して行っています。
内容的には同一のようです.




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