EnterpriseDB/repmgr

Getting error on repmgr5.0 with PostgreSQL12 ( while configuring and cloning standby server ) ( undefined symbol: PQconninfo )

Closed this issue · 3 comments

-bash-4.2$ /usr/pgsql-12/bin/repmgr -h sbx1pri -U repmgr -d repmgr -f /etc/repmgr/12/repmgr.conf standby clone --dry-run
NOTICE: destination directory "/home/postgres/data" provided
INFO: connecting to source node
DETAIL: connection string is: host=sbx1pri user=repmgr dbname=repmgr
DETAIL: current installation size is 2852 MB
INFO: "repmgr" extension is installed in database "repmgr"
INFO: parameter "max_wal_senders" set to 5
NOTICE: checking for available walsenders on the source node (2 required)
INFO: sufficient walsenders available on the source node
DETAIL: 2 required, 5 available
NOTICE: checking replication connections can be made to the source server (2 required)
/usr/pgsql-12/bin/repmgr: symbol lookup error: /usr/pgsql-12/bin/repmgr: undefined symbol: PQconninfo
-bash-4.2$

Configuration file details

node_id=2
node_name='sbx2pri'
conninfo='host=sbx2pri user=repmgr dbname=repmgr connect_timeout=2'

data_directory='/home/postgres/data'

It seems you are using an old libpq. PQconninfo was introduced in Postgres 9.3. Check which libpq, repmgr is using:

ldd /usr/pgsql-12/bin/repmgr | grep libpq
	libpq.so.5 => /usr/pgsql-12/lib/libpq.so.5 (0x00007f4ad5f30000)

If it is not from a recent postgres version, install a newer postgresqlXX-libs package. Since you are using repmgr12, I recommend that you install postgresql12-libs. You can check the installed postgresqlXX-libs packages using:

yum list installed | grep 'postgresql..-libs'

If postgresql12-libs is already installed, you probably have to fix the path that your system searches for shared objects (LD_LIBRARY_PATH).

Thanks for the feedback, closing this.