简体   繁体   中英

Problem when upgrading postgres from 9.5 to 11

I have a problem using PostgreSQL when tried to upgrade it from 9.5 to 11. I'm using initdb to make my master and when I tried to pg_upgrade -c there is an error like this:

Could not load library "$libdir/repmgr_funcs": ERROR: could not access file "$libdir/repmgr_funcs": No such file or directory

I have checked \\dx , and there is no extension installed except plpgsql , and I already install the new version of repmgr in Postgres 11.

Do you have any idea how to fix this?

Some clues: I checked /usr/lib/postgresql/9.5/lib and find repmgr_funcs.so , but it is empty. So it is safe to delete manually? I'm still replicating master to slave.

At some point in the past, repmgr had a shared library called repmgr_funcs.so , but not in recent versions. This can cause problems during upgrade.

The easiest solution would be to uninstall repmgr before you upgrade and then install it again on the new system.

If repmgr is installed as an extension, simply DROP EXTENSION repmgr on the old system. Otherwise, you will have to identify the functions and delete them individually:

SELECT proname, pronamespace::regnamespace
FROM pg_proc
WHERE probin LIKE '%repmgr%';

Please test this before you try it on your live system.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM