Postgres Register Standby fails

450 Views Asked by At

I am trying to setup a Primary and a standby using repmgr. I think I have successfully setup master, but standby setup keeps failing.

On Standby node

/usr/pgsql-12/bin/repmgr -h master_ip  standby clone
NOTICE: destination directory "/var/lib/pgsql/12/data" provided
INFO: connecting to source node
DETAIL: connection string is: host=master_ip
DETAIL: current installation size is 32 MB
ERROR: repmgr extension is available but not installed in database "(null)"
HINT: check that you are cloning from the database where "repmgr" is installed

On Master Node:

/usr/pgsql-12/bin/repmgr cluster show
 ID | Name        | Role    | Status    | Upstream | Location | Priority | Timeline | Connection string
----+-------------+---------+-----------+----------+----------+----------+----------+----------------------------------------------------------------
 1  | hostname | primary | * running |          | default  | 100      | 1        | host=master_ip dbname=repmgr user=repmgr connect_timeout=2

postgres=# SELECT * FROM pg_available_extensions WHERE name='repmgr';
  name  | default_version | installed_version |              comment
--------+-----------------+-------------------+------------------------------------
 repmgr | 5.3             |                   | Replication manager for PostgreSQL
1

There are 1 best solutions below

0
Oxycash On

resolved after adding -U repmgr -d repmgr to the clone command.