After configuring the PostgreSQL, we need to restart PostgreSQL:

  1. Enter the command
    systemctl restart postgresql-10
  2. After restarting we need to open the default port (5432) using firewall-cmd:
    (root)
    1. firewall-cmd --add-port=5432/tcp --permanent
    2. firewall-cmd --reload
  3. Enter the following commands on the primary node ONLY:
    1. su - postgres
    2. psql -c "alter role postgres password '<postgres user password>';"
    3. exit
  4. On all nodes create a user (role) in PostgreSQL to perform the replication. The user has to have the replication role on all nodes:
    1. su - postgres
    2. psql -c "CREATE ROLE repuser LOGIN SUPERUSER REPLICATION PASSWORD '<postgres user password>';"
    3. exit
  5. Create the REPMGR extension once for each PostgreSQL server:
    1. su - postgres
    2. psql -c "CREATE EXTENSION repmgr;"
    3. exit
  6. Finally, we need to update the path in “~/.bash_profile” (user: root). Add the following line to the bash_profile file (Note the commands are case-sensitive):
    1. vi /root/.bash_profile
      Replace “export PATH” with “export PATH=/usr/pgsql-10/bin:$PATH”
    2. source /root/.bash_profile
    3. Validate by running “repmgr”, you will get an error message “cannot be run as root

Need more help with this?
Click here to open a Support ticket

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.