Обсуждение: BUG #16568: pg_upgrade failed from 9.3 to 9.6
The following bug has been logged on the website:
Bug reference: 16568
Logged by: Phanindra A
Email address: a.h.s.phani@gmail.com
PostgreSQL version: 9.6.18
Operating system: rhel 6.7
Description:
Hi,
I am trying to upgrade PG 9.3.4 (repmgr 3.0.1) to PG 9.6.18 (repmgr 4.4)
. On using pg_upgrade getting below error.
$ /usr/local/pgsql-9.6/bin/pg_upgrade -b /usr/local/pgsql/bin -B
/usr/local/pgsql-9.6/bin -d /pgdata/data/ -D /pgdata/data_9.6 -U postgres
-c
*failure*
Consult the last few lines of "pg_upgrade_server.log" for
the probable cause of the failure.
Performing Consistency Checks on Old Live Server
------------------------------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for reg* system OID user data types ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for roles starting with 'pg_' ok
Checking for invalid "line" user columns ok
Checking for presence of required libraries fatal
Your installation references loadable libraries that are missing from the
new installation. You can add these libraries to the new installation,
or remove the functions using them from the old installation. A list of
problem libraries is in the file:
loadable_libraries.txt
Failure, exiting
$ cat loadable_libraries.txt
could not load library "$libdir/repmgr_funcs":
ERROR: could not access file "$libdir/repmgr_funcs": No such file or
directory
$ pg_config --pkglibdir
/usr/local/pgsql/lib
$ ll /usr/local/pgsql/lib/repmgr_funcs.so
-rwxrwxrwx. 1 root root 10220 Mar 27 2018
/usr/local/pgsql/lib/repmgr_funcs.so
Repmgr installation is done form source.
postgres configuration is done like below.
$ grep shared_preload_libraries /pgdata/data/postgresql.conf
shared_preload_libraries = 'repmgr_funcs' # (change requires
restart)
$ grep shared_preload_libraries /pgdata/data_9.6/postgresql.conf
shared_preload_libraries = 'repmgr' # (change requires restart)
PG Bug reporting form <noreply@postgresql.org> writes:
> I am trying to upgrade PG 9.3.4 (repmgr 3.0.1) to PG 9.6.18 (repmgr 4.4)
> . On using pg_upgrade getting below error.
> $ cat loadable_libraries.txt
> could not load library "$libdir/repmgr_funcs":
> ERROR: could not access file "$libdir/repmgr_funcs": No such file or
> directory
> $ pg_config --pkglibdir
> /usr/local/pgsql/lib
> $ ll /usr/local/pgsql/lib/repmgr_funcs.so
> -rwxrwxrwx. 1 root root 10220 Mar 27 2018
> /usr/local/pgsql/lib/repmgr_funcs.so
First, are you sure you are interrogating the new installation's
pg_config rather than the old one's? (If they are both pointing at
/usr/local/pgsql/lib, you have an issue you need to fix right there.)
If that's not it, the most likely interpretation is that the "No such
file" complaint refers to something that repmgr_funcs.so depends on
rather than repmgr_funcs.so itself. You could try doing
ldd /usr/local/pgsql/lib/repmgr_funcs.so
to see if that shows any unresolved references.
There might also be useful detail in the new postmaster's log file from
the failed pg_upgrade; if ldd doesn't show any problem then you should
look there.
regards, tom lane