Configuring repmgr#
TPAは、 failover_manager インスタンス変数がrepmgr
に設定されているすべてのpostgresインスタンスにrepmgrをインストールします。これはデフォルト設定です。
repmgr
構成ファイルのディレクトリは、デフォルトで/etc/repmgr/<version>
になります。ここで、 <version>
は、このインスタンスにインストールされるpostgresのメジャーバージョンですが、インスタンスのrepmgr_conf_dir
変数を設定することにより変更できます。構成ファイル自分自身は常にrepmgr.conf
と呼ばれます。
デフォルトのrepmgr構成は、ロール primary とロール replica
で構成されたインスタンス間の自動フェイルオーバーをセットアップします。
repmgr構成#
次のインスタンス変数を設定できます。
repmgr_priority : sets priority in the config file
repmgr_location : sets location in the config file
repmgr_reconnect_attempts : sets reconnect_attempts in the
config file, default 6 repmgr_reconnect_interval : sets
reconnect_interval in the config file, default 10
repmgr_use_slots : sets use_replication_slots in the config
file, default 1 repmgr_failover 構成ファイルでfailover
を設定します、デフォルトautomatic
repmgr_conf_settings の追加設定もrepmgr構成ファイルに渡されます。
PGDインスタンスの## repmgr
PGDインスタンスでは、repmgr_failover はデフォルトでmanual
に設定されます。