如何使用PostGIS升级PostgreSQL? [英] How to upgrade PostgreSQL with PostGIS?

查看:210
本文介绍了如何使用PostGIS升级PostgreSQL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行PostgreSQL 9.1,并且试图升级到PostgreSQL 9.3:

I was running PostgreSQL 9.1 and I am trying to upgrade to PostgreSQL 9.3:

$/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B/usr/lib/postgresql/9.3/bin -d /var/lib/postgresql/9.1/main/-D/var/lib/postgresql/9.3/main/-O"-c config_file =/etc/postgresql/9.3/main/postgresql.conf"-o" -c config_file =/etc/postgresql/9.1/main/postgresql.conf"

$ /usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.3/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.3/main/ -O "-c config_file=/etc/postgresql/9.3/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"

但是它失败了:

检查必需的库是否致命

Checking for presence of required libraries fatal

您的安装参考了以下库中缺少的可加载库 新安装.您可以将这些库添加到新库中 安装,或从旧版本中删除使用它们的功能 安装.文件中包含问题库的列表: loadable_libraries.txt

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

loadable_libraries.txt包含:

无法加载库"$ libdir/postgis-1.5"错误:无法访问 文件"$ libdir/postgis-1.5":没有这样的文件或目录

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

它类似于

It is similar to Missing libraries when upgrading to PostGIS 2.1 and PostgreSQL 9.3.1 using homebrew.

我正在运行Ubuntu,并且已经使用apt-get在PostGIS中安装了PostgreSQL.

I am running Ubuntu and I have install PostgreSQL with PostGIS using apt-get.

有人管理过吗?

推荐答案

因为不支持PostGIS 1.5使用PostgreSQL 9.3 ,您还将升级PostGIS版本.由于pg_upgrade不能用于此目的,因此您需要遵循硬升级过程,它利用PostGIS随附的postgis_restore.pl脚本中的逻辑.如果您对该程序还有其他疑问,请将其修改为该问题.

Since PostGIS 1.5 is not supported with PostgreSQL 9.3, you are also upgrading PostGIS versions. Since pg_upgrade cannot be used for this, you will need to follow the hard upgrade procedure, which utilises logic in a postgis_restore.pl script that comes with PostGIS. If you have any further questions with the procedure, amend them to this question.

这篇关于如何使用PostGIS升级PostgreSQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆