Created
October 11, 2012 18:20
-
-
Save yonestra/3874455 to your computer and use it in GitHub Desktop.
PostgreSQL9.1でレプリケーション設定 ref: http://qiita.com/items/062074c60c9b161386b0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wal_level = hot_standby | |
max_wal_senders = 2 #レプリケーション中に再度ベースバックアップをしたい場合の保険にスレーブ数+1に設定 | |
synchronous_standby_names = 'slave1' #今回はスレーブ側でスレーブ名をslave1に設定 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TYPE DATABASE USER CIDR-ADDRESS METHOD | |
host replication 接続ユーザー スレーブサーバーのIP trust #この設定を追加 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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