PostgreSQL 服务器从 9.x 升级到 10 的最简单方法

PostgreSQL server upgrade from 9.x to 10 easiest way

我一直在尝试使用 pg_upgrade 将我的 postgres 服务器从 9.6 升级到 10。但是,卡在所需库的一致性检查中。 loadable_libraried.txt 显示为:

could not load library "$libdir/postgis_topology-2.3": 
ERROR:  could not access file "$libdir/postgis_topology-2.3": No such file or directory

我是第一次尝试这个。任何建议将不胜感激。谢谢!

就您已在 PostgreSQL 9.6 安装中安装 PostGis 而言,您还需要将其添加到 PostgreSQL 10 安装中。 没有的请下载并安装:

wget https://download.osgeo.org/postgis/source/postgis-2.3.7.tar.gz
tar zxf postgis-2.3.7.tar.gz
cd postgis-2.3.7
./configure --with-pgconfig=/PATH_TO_POSTGRESQL_10_pg_config
make
make install

然后继续pg_upgrade。 (您可能需要对其他扩展程序重复该过程)。