[pgsql-jp: 34443] Re: pgpool 2.3.1 で縮退運転に失敗します

Ishikawa Tomoyuki ishikawa @ sys.tosho.co.jp
2004年 12月 9日 (木) 09:14:22 JST


石川です。

> 何度も申し訳ないのですが,この問題を修正した
>
> http://www2b.biglobe.ne.jp/~caco/tmp/pgpool-2.3.1.tar.gz
>
> を試してみていただけないでしょうか?

修正版でテストしたところ、縮退運転に入る場合と失敗する場合の両方が起こりまし
た。
それぞれの場合の条件は現在調査中ですが、とりあえず以下のようなデバッグログが
出力されたので、
ご報告いたします。


1. kill -QUIT でSecondary 側のpostmaster を停止する
2. データベースへアクセスする

●成功した場合

・1回目:失敗
---
postgres=# select * from test;
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: Failed.
!>
---
DEBUG: pid 3140: read kind from frontend Q(51)
DEBUG: pid 3140: Query: select * from test;
DEBUG: pid 3140: read kind from backend T
DEBUG: pid 3140: pool_process_query: waiting for secondary for data ready
ERROR: pid 3140: pool_process_query: kind does not match between backends
master
(T) secondary(N)
LOG: pid 3140: do_child: exits with status 1 due to error
DEBUG: pid 3139: I am 3139 accept fd 6
DEBUG: pid 3139: Protocol Major: 3 Minor: 0 database: postgres user:
postgres
DEBUG: pid 3108: reap_handler called
ERROR: pid 3139: connect_inet_domain_socket: connect() failed: Connection
refused
LOG: pid 3139: notice_backend_error: master: 0 fail over request from pid
3139
DEBUG: pid 3108: failover_handler called
LOG: pid 3108: starting degeneration. shutdown secondary host
Secondary_Host(5432)
DEBUG: pid 3108: kill 3109
DEBUG: pid 3108: kill 3110
:
:
DEBUG: pid 3108: kill 3140
DEBUG: pid 3144: I am 3144
DEBUG: pid 3145: I am 3145
:
:
DEBUG: pid 3175: I am 3175
LOG: pid 3108: degenration done. shutdown secondary host
Secondary_Host(5432)
---

・2回目:成功
---
ishikawa$ psql -p 9999
Welcome to psql 7.4.3, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

postgres=#
---
DEBUG: pid 3175: I am 3175 accept fd 6
DEBUG: pid 3175: Protocol Major: 3 Minor: 0 database: postgres user:
postgres
DEBUG: pid 3175: name: client_encoding value: SQL_ASCII
DEBUG: pid 3175: name: DateStyle value: ISO, MDY
DEBUG: pid 3175: name: is_superuser value: on
DEBUG: pid 3175: name: server_version value: 7.4.3
DEBUG: pid 3175: name: session_authorization value: postgres
DEBUG: pid 3175: read kind from backend pending data Z len: 5 po: 160
DEBUG: pid 3175: ReadyForQuery: message length: 5
DEBUG: pid 3175: ReadyForQuery: transaction state: I
---


●失敗した場合

・1回目:失敗
---
postgres=# select * from test;
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: Failed.
!>
---
DEBUG: pid 349: read kind from frontend Q(51)
DEBUG: pid 349: Query: select * from test;
DEBUG: pid 349: read kind from backend T
DEBUG: pid 349: pool_process_query: waiting for secondary for data ready
ERROR: pid 349: pool_process_query: kind does not match between backends
master(
T) secondary(N)
LOG: pid 349: do_child: exits with status 1 due to error
DEBUG: pid 348: I am 348 accept fd 6
DEBUG: pid 348: Protocol Major: 3 Minor: 0 database: postgres user: postgres
DEBUG: pid 317: reap_handler called
DEBUG: pid 317: child 349 exits with status 256 by signal 0
ERROR: pid 348: connect_inet_domain_socket: connect() failed: Connection
refused
LOG: pid 348: notice_backend_error: master: 0 fail over request from pid 348
DEBUG: pid 356: I am 356
DEBUG: pid 317: failover_handler called
LOG: pid 317: starting degeneration. shutdown secondary host
Secondary_Host(5432)
DEBUG: pid 317: kill 318
DEBUG: pid 317: kill 319
:
:
DEBUG: pid 317: kill 349
---

・2回目:失敗
---
ishikawa$ psql -p 9999
psql: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
---
DEBUG: pid 356: I am 356 accept fd 6
DEBUG: pid 356: Protocol Major: 3 Minor: 0 database: postgres user: postgres
ERROR: pid 356: connect_inet_domain_socket: connect() failed: Connection
refused
LOG: pid 356: notice_backend_error: master: 0 fail over request from pid 356
User Signal 2
---




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