5

I follow this link to create master slave replication on Ubuntu postgresql server.

My Configuration of repmgr and postgresql are:

Postgresql 9.5-: /opt/PostgreSQL/9.5/

repmgr-: /usr/lib/postgresql/9.5/bin/repmgr

repmgr.conf -: /etc/rep.conf

pg_config --pkglibdir => /usr/lib/postgresql/9.5/lib


ls /usr/lib/postgresql/9.5/lib | grep repmgr_funcs => repmgr_funcs.so

I am getting ERROR-: unable to create the function

repmgr_update_last_updated: ERROR:  could not access file "$libdir/repmgr_funcs": No such file or directory

ERROR: Unable to create repmgr schema - see preceding error message(s); aborting
Tombart
  • 30,520
  • 16
  • 123
  • 136
Manish Yadav
  • 435
  • 2
  • 8
  • 24
  • Did lib install in correct place? `$ pg_config --pkglibdir` => `/usr/lib/postgresql/9.6/lib` then `$ ls /usr/lib/postgresql/9.6/lib | grep repmgr_funcs` => `repmgr_funcs.so` – Łukasz Kamiński Apr 20 '17 at 10:28
  • @ŁukaszKamiński I update the question please check..thanks for your response – Manish Yadav Apr 21 '17 at 04:40
  • You could give absolute path to where library is located (in function body), something like `AS '/usr/lib/postgresql/9.5/lib/repmgr_funcs'`. But it shouldn't really matter if you already have it in $libdir. Maybe for some reason postgres doesn't have access to its $libdir. I can't come up with any good answer sadly. – Łukasz Kamiński Apr 21 '17 at 06:16
  • @ŁukaszKamiński Thanks for your response so i add path to libdir – Manish Yadav Apr 21 '17 at 09:59

1 Answers1

6

If you are using repmgr ver. 4 and above then you need to change in postgresql.conf
From shared_preload_libraries = 'repmgr_funcs'
To shared_preload_libraries = 'repmgr'

Below are their upgrade notes

The repmgr shared library has been renamed from repmgr_funcs to repmgr, meaning shared_preload_libraries in postgresql.conf needs to be updated to the new name: shared_preload_libraries = 'repmgr'

Artem Bernatskyi
  • 4,185
  • 2
  • 26
  • 35