Advertisement
Guest User

Untitled

a guest
Feb 1st, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. cluster=main
  2. node=3
  3. node_name=witness
  4. conninfo='host=[WITNESS IP] dbname=witness user=witness password=witness port=5499'
  5. master_response_timeout=60
  6. reconnect_attempts=6
  7. reconnect_interval=10
  8. failover=automatic
  9. promote_command='promote_command.sh'
  10. follow_command='/usr/lib/postgresql/9.1/bin/repmgr standby follow -f /etc/repmgr/repmgr.conf'
  11.  
  12. cluster=main
  13. node=2
  14. node_name=node2
  15. conninfo='host=[STANDBY IP] dbname=[DB NAME] user=[DB USER NAME] password=[PASSWORD]'
  16. master_response_timeout=60
  17. reconnect_attempts=6
  18. reconnect_interval=10
  19. failover=automatic
  20. promote_command='promote_command.sh'
  21. follow_command='/usr/lib/postgresql/9.1/bin/repmgr standby follow -f /etc/repmgr/repmgr.conf'
  22.  
  23. cluster=main
  24. node=1
  25. node_name=node1
  26. conninfo='host=[MASTER IP] dbname=[MASTER DB] user=[MASTER DB USER] password=[PASSWORD]'
  27. master_response_timeout=60
  28. reconnect_attempts=6
  29. reconnect_interval=10
  30. failover=automatic
  31. promote_command='promote_command.sh'
  32. follow_command='/usr/lib/postgresql/9.1/bin/repmgr standby follow -f /etc/repmgr/repmgr.conf'
  33.  
  34. host all repmgr 192.168.1.1/32 md5
  35. host replication all 192.168.1.1/32 md5
  36.  
  37. /usr/lib/postgresql/9.1/bin/pg_ctl reload -D /var/lib/postgresql/9.1/main
  38.  
  39. createuser --login --superuser -P repmgr -W
  40. createdb -O repmgr repmgr
  41.  
  42. su - postgres
  43. cat > .pgpass << EOF
  44. *:*:*:repmgr:secret_passw0rd
  45. EOF
  46. chmod 0600 .pgpass
  47.  
  48. host all repmgr 192.168.1.1/32 trust
  49. host replication all 192.168.1.1/32 trust
  50.  
  51. psql -h master.hostname -U repmgr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement