中央管理ノードをセットアップします。
PATHなどの環境変数は、通常のPostgreSQLのセットアップと同じため、環境に合わせて設定してください。
本手順では、中央管理ノードはデータベース多重化運用を行うことを想定しています。そのため、プライマリサーバとスタンバイサーバをそれぞれセットアップし、裁定サーバから監視するようにセットアップする必要があります。
作成手順、起動方法は“3.5 中央管理ノードのセットアップ”を参照してください。
下記はpostgrsql.confの設定例です。ポート番号は実行環境に合わせて変更してください。
なお、postgres_scaleout_fdw.max_resolver_workers以降の設定は、レプリケーションテーブルやデータノードの数に依存します。追加する場合には見積もって変更してください。
# # Common settings for primary and standby # port=27500 # database port shared_preload_libraries='postgres_scaleout_fdw, watchdog' wal_level='logical' listen_addresses='*' # remote # for log file log_connections = on logging_collector=on log_directory = 'log' log_filename='postgresql-%Y-%m-%d.log' # for scale out cluster_name='coordinator' postgres_scaleout_fdw.application_name='%p_for_%a' max_prepared_transactions=100 wal_arbiter=off # for watchdog watchdog.port=28500 # Replication fetch_slots=on # synchronous_standby_names = 'standby' # synchronous_commit=on # max 5 datanode + max 10 replication table postgres_scaleout_fdw.max_resolver_workers=4# default
max_worker_processes=16# default(8) + 8
max_replication_slots=32# default(10) + (2 * 5 node + 2) + 10 tables
max_wal_senders=43# default(10) + (32 + 1)
スタンバイサーバは、従来のストリーミングレプリケーションの構築と同じ手順で作成してください。
詳細は、“クラスタ運用ガイド(データベース多重化編)”の“スタンバイサーバのセットアップ”を参照してください。