将9.3升级到9.4时无法加载库“ $ libdir / pg_stat_plans”

时间:2019-02-16 01:24:41

标签: postgresql

将Postgres 9.3.4升级到9.4时的库问题

我正在尝试将Postgres 9.3.4升级到Postgres 9.4,但即时通讯出现错误。

/usr/pgsql-9.4/bin/pg_upgrade --old-bindir=/usr/pgsql-9.3/bin/ --new-bindir=/usr/pgsql-9.4/bin/ --old-datadir=/crpjirw1/postgres1/9.3/data/ --new-datadir=/crpjirw1/postgres1/9.4/data/ --check       

Performing Consistency Checks     

Checking cluster versions                                   ok     
Checking database user is a superuser                       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 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

more loadable_libraries.txt

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

我在libdir中检查了没有文件pg_stat_plans

 pg_config  --pkglibdir      

/usr/pgsql-9.3/lib    

cd /usr/pgsql-9.3/lib    
ls -lrt pg_stat_plan

ls: cannot access pg_stat_plan*: No such file or directory

我不知道它在哪里寻找pg_stat_plan lib文件。 有人帮我解决此问题。

1 个答案:

答案 0 :(得分:0)

我已经解决了问题。

删除了pg_stat_plans扩展名以解决此问题。

有多个函数将与pg_stat_plans扩展相关联

即使没有像pg_stat_plans这样的扩展程序,

删除扩展程序仍然有效,并且它会自动删除与该扩展程序关联的所有功能和视图,并解决了该问题。

所以我们必须先卸载rpm包pg_stat_plans.xxxxx.rpm,然后删除扩展名并触发pg_upgrade,它对我有用。