Skip to content

Instantly share code, notes, and snippets.

@yonestra
Created October 11, 2012 18:20
Show Gist options
  • Save yonestra/3874455 to your computer and use it in GitHub Desktop.
Save yonestra/3874455 to your computer and use it in GitHub Desktop.
PostgreSQL9.1でレプリケーション設定 ref: http://qiita.com/items/062074c60c9b161386b0
wal_level = hot_standby
max_wal_senders = 2 #レプリケーション中に再度ベースバックアップをしたい場合の保険にスレーブ数+1に設定
synchronous_standby_names = 'slave1' #今回はスレーブ側でスレーブ名をslave1に設定
# TYPE DATABASE USER CIDR-ADDRESS METHOD
host replication 接続ユーザー スレーブサーバーのIP trust #この設定を追加
standby_mode = on
primary_conninfo = 'host=master port=5432 application_name=slave1' # スレーブ名をapplication_nameに設定
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment