【发布时间】:2020-11-03 16:04:59
【问题描述】:
我正在尝试使用 Postgresql 13 附带的 pg_upgrade 将系统从 Postgresql 9.6 升级到 Postgresql 13。此升级失败并出现错误:
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
-bash-4.2$ cat loadable_libraries.txt
could not load library "$libdir/plpython2": ERROR: could not access file "$libdir/plpython2": No such file or directory
In database: infohub
这个错误对我来说似乎很清楚,infohub 数据库使用 plpython2 扩展,它没有为 postgresql 13 安装(甚至不存在)。
我的问题是我已经尝试删除扩展,但 pg_upgrade 仍然失败并出现上述错误。
postgres=# \c infohub
psql (13.0, server 9.6.19)
You are now connected to database "infohub" as user "postgres".
infohub=# DROP EXTENSION plpythonu CASCADE ;
DROP EXTENSION
我尝试使用这个语句来检查是否有任何功能
infohub=# select DISTINCT l.lanname as function_language
from pg_proc p
left join pg_language l on p.prolang = l.oid
;
function_language
-------------------
internal
sql
c
plpgsql
(4 rows)
据我所知,没有依赖于 plpythonu(或 plpython2)的函数,但是 pg_upgrade 仍然给我上述关于缺少扩展的错误。
任何帮助或想法将不胜感激。
【问题讨论】:
-
新错误是否仍然显示“在数据库中:infohub”?可能需要将其放入多个数据库中。
标签: postgresql plpython