[pgsql-jp: 37768] pgpoolでsecondaryの異常時にトランザクションを正常終了させる方法

Sho Hashimoto sho-h @ netlab.jp
2006年 12月 11日 (月) 17:10:27 JST


橋本と申します。

pgpool 3.1.1 をデータベースのレプリケーションのために使用しています。
pgpoolのレプリケーションを使用している場合に片方のデータベースに異常が
発生すると、次のような動作をするものだと認識しております。

(1) ヘルスチェック、もしくは SELECT 文の発行時にpgpoolが異常を検知する
(2) その後、pgpool 経由でデータベースにアクセスした時に以下のエラーを
    pgpoolが返答する

      server closed the connection unexpectedly
              This probably means the server terminated abnormally
              before or while processing the request.

しかしながら、master 側はともかく、secondary 側の異常時にはトランザク
ションを正常に終了させたいと考えております。なお、データベースの状態は 
pgpool の show pool_status により定期的に確認することを考えております。
 
設定方法、運用方法などについてご教授頂けないでしょうか。
本メールの下部に現在運用している pgpool の設定を記述します。

よろしくお願いします。

listen_addresses = ''
port = 5433
socket_dir = '/var/run/postgresql'
backend_host_name = ''
backend_port = 5432
backend_socket_dir = '/var/run/postgresql'
secondary_backend_host_name = 'secondary'
secondary_backend_port = 5432
num_init_children = 32
max_pool = 4
child_life_time = 300
connection_life_time = 0
child_max_connections = 0
logdir = '/tmp'
replication_mode = true
replication_strict = true
replication_timeout = 5000
load_balance_mode = true
weight_master = 1
weight_secondary = 0
replication_stop_on_mismatch = false
reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'
print_timestamp = true
master_slave_mode = false
connection_cache = true
health_check_timeout = 30
health_check_period = 30
health_check_user = 'nobody'
insert_lock = true
ignore_leading_white_space = false
log_statement = true

----------------------------
ネットワーク応用通信研究所
橋本 将(Sho HASHIMOTO)
sho-h @ netlab.jp
----------------------------



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