Tuesday , March 19 2024

REPMGR INSTALLATION AND CONFIGURATION FOR POSTGRESQL

We will perform REPMGR installation and configuration for postgresql in this article. You can see our environments. pg is our primary postgresql cluster and the others are our standbys

MachineIPROLE
pg10.0.0.4Primary
pgrep10.0.0.5Replication
Pgrep210.0.0.6Replication2

Pre Request:

  • PostgreSQL must be installed in Primary and Standbys..
  • Replication must be configured for this environment.

You may want to read below articles to install PostgreSQL and configure replication.

How To Install PostgreSQL On centos/redhat“,

How To Install PostgreSQL Replication By using archive_command On Centos“,

How To Create PostgreSQL Repository To Install Postgres Without Internet“,

How To Install PostgreSQL 9.6 on Debian 8.x (Jessie)“,

How To Install PostgreSQL Replication With Replication Slots“,

How To Install Streaming Replication in PostgreSQL 12

Install REPMGR

We are installing repmgr12 in all postgresql database machine.

We are executing below command in Primary Node.

We are changing below parameter in postgresql.conf file.
We are changing below parameters in /etc/repmgr/12/repmgr.conf file in primary server.

For Primary:

We are changing below parameters in /etc/repmgr/12/repmgr.conf file in standby server.

For Replication:

We are changing below parameters in /etc/repmgr/12/repmgr.conf file in standby2 server.

For Replication2:

We are adding below all line in pg_hba.conf file in all postgresql database machine. And also restart all database service. (if you must change 10.0.0.0 ip addreses because your machines ip can be different.)

We are testing below commands in standby and standby2 machine.

We are registering below commands in  primary node.

We are registering below command in standby servers.

We are checking registration status below command in primary machine.

If you want you will look replication information in primary machine.

Best Regards

Engin YILMAZ.

Loading

About Engin Yilmaz

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories