Postgres 从 10 升级到 12:pg_upgrade 由于存在所需库而失败

Shu*_*ngh 3 database postgresql upgrade postgresql-10 postgres-12

$ /usr/pgsql-12/bin/pg_upgrade \
> -b /usr/pgsql-1
pgsql-10/ pgsql-12/
> -b /usr/pgsql-10/bin/ \
> -B /usr/pgsql-12/bin/ \
> -d /var/lib/pgsql/1
10/ 12/
> -d /var/lib/pgsql/10/data/ \
> -D /var/lib/pgsql/12/data/ \
> --check

Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for system-defined composite types in user tables ok
Checking for reg* data types in user tables ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for tables WITH OIDS ok
Checking for invalid "sql_identifier" 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


[postgres@localhost ~]$ cat loadable_libraries.txt
could not load library "$libdir/ltree": ERROR: could not access file "$libdir/ltree": No such file or directory
Database: ___
Database: ___
could not load library "$libdir/pg_trgm": ERROR: could not access file "$libdir/pg_trgm": No such file or directory
Database: ___
Database: ___
could not load library "$libdir/uuid-ossp": ERROR: could not access file "$libdir/uuid-ossp": No such file or directory
Database: ___
Database: ___
Run Code Online (Sandbox Code Playgroud)

从 postgres 10 升级到 12 的有效步骤将受到高度赞赏。因为我没有找到任何经过高度评价的完整链接。我目前正在关注此链接:https://www.postgresql.r2schools.com/how-to-upgrade-from-postgresql-11-to-12/。在每个命令中都替换为10for 11

提前致谢。

小智 5

您可以运行命令:

sudo dnf install postgresql12-contrib
Run Code Online (Sandbox Code Playgroud)