AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题 / 150085
Accepted
John Eisbrener
John Eisbrener
Asked: 2016-09-20 10:38:22 +0800 CST2016-09-20 10:38:22 +0800 CST 2016-09-20 10:38:22 +0800 CST

升级包含 PostGIS 扩展的 Greenplum DB

  • 772

我们有许多运行 PostGIS 1.4 的 4.2.3.2 Greenplum 数据库。我们正在尝试将这些数据库安装到更新版本的 Greenplum 上,例如 4.3.8.1 或重新发布的 4.3.9.1 版本,但是在尝试将 PostGIS 升级到 2.0 版时我们遇到了一堆问题。我们已经尝试了多种不同的方法来升级数据库,而不会影响依赖于 PostGIS 1.4 的数据和功能,但看起来当我们使用新的 PostGIS 扩展运行gppkg实用程序时,我们只会出现错误,类似于以下内容:

gppkg -i postgis-ossv2.0.3_pv2.0.1_gpdb4.3orca-rhel5-x86_64.gppkg 
20160919:13:21:20:024675 gppkg:s-md-pv-gp-01-01:gpadmin-[INFO]:-Starting gppkg with args: -i postgis-ossv2.0.3_pv2.0.1_gpdb4.3orca-rhel5-x86_64.gppkg
20160919:13:21:20:024675 gppkg:s-md-pv-gp-01-01:gpadmin-[CRITICAL]:-gppkg failed. (Reason='__init__() got an unexpected keyword argument 'postupdate'') exiting...

我们还通过 -u 标志运行 gppkg,结果相似:

gppkg -u postgis-ossv2.0.3_pv2.0.1_gpdb4.3orca-rhel5-x86_64.gppkg 
20160919:13:35:52:024930 gppkg:s-md-pv-gp-01-01:gpadmin-[INFO]:-Starting gppkg with args: -u postgis-ossv2.0.3_pv2.0.1_gpdb4.3orca-rhel5-x86_64.gppkg
20160919:13:35:52:024930 gppkg:s-md-pv-gp-01-01:gpadmin-[WARNING]:-WARNING: The process of updating a package includes removing all
20160919:13:35:52:024930 gppkg:s-md-pv-gp-01-01:gpadmin-[WARNING]:-previous versions of the system objects related to the package. For
20160919:13:35:52:024930 gppkg:s-md-pv-gp-01-01:gpadmin-[WARNING]:-example, previous versions of shared libraries are removed.
20160919:13:35:52:024930 gppkg:s-md-pv-gp-01-01:gpadmin-[WARNING]:-After the update process, a database function will fail when it is
20160919:13:35:52:024930 gppkg:s-md-pv-gp-01-01:gpadmin-[WARNING]:-called if the function references a package file that has been removed.
Do you still want to continue ? Yy|Nn (default=N):
> y
20160919:13:35:59:024930 gppkg:s-md-pv-gp-01-01:gpadmin-[CRITICAL]:-gppkg failed. (Reason='__init__() got an unexpected keyword argument 'postupdate'') exiting...

一个主要的警告可能也与以下事实有关,即只有Greenplum 版本 4.2.6.X 到 4.2.8.X 同时支持 postGIS 的 1.4 和 2.0 版本。在这一点上,我们正在寻找一些关于如何进行的方向,希望其他人可能已经遇到了其中的一些障碍。

我们已经与供应商 Pivotal 取得了联系,但这些都没有取得成果,所以我在这里发帖,希望社区能为我指明方向。

谢谢,

约翰

postgis upgrade
  • 2 2 个回答
  • 276 Views

2 个回答

  • Voted
  1. 3manuek
    2016-09-28T17:18:50+08:002016-09-28T17:18:50+08:00

    我敢打赌这个postgis-ossv2.0.3_pv2.0.1_gpdb4.3orca-rhel5-x86_64.gppkg包有一个错误,它没有实现Gppkg 类postupdate中定义的。TAG 是可选的,所以它看起来像是在调用(SPECFILE_OPTIONAL_TAGS = ... 'postupdate'] )

    检查该位置是否存在升级脚本 ($GPHOME/share/postgresql/contrib/postgis-2.0/postgis_upgrade_20_minor.sql)。包装细节。

    从该规范:

    PostUpdate:
    10  - Master: "echo 'Please run psql -d mydatabase -f 
    $GPHOME/share/postgresql/contrib/postgis-2.0/postgis_upgrade_20_minor.sql 
    to finish the update.'"
    

    另外,您可能想尝试该--clean选项

    • 2
  2. Best Answer
    John Eisbrener
    2016-10-05T10:12:08+08:002016-10-05T10:12:08+08:00

    我们确定的升级路径正是kludgy的定义,但它看起来是通过升级数据库和升级 PostGIS 扩展的最终结果来获取所有数据。(无可否认,Rube Goldberg-ish)步骤如下,并且服务器上的每个数据库都需要升级,其中包含 PostGIS 数据:

    1. pg_dump包含服务器上每个数据库的 PostGIS 相关数据的所有表
    2. 对于在步骤 1中具有 PostGIS 表的数据库,删除所有包含 PostGIS 相关数据(与刚刚备份的数据相同)的表
    3. 针对在步骤 1中具有 PostGIS 表的数据库运行unstall_postgis.sql脚本$GPHOME/share/postgrestql/contrib
    4. 卸载 PostGIS 1.0 gppkg ( %> gppkg -r postgis-1.0)
    5. 通过gpmigrator/gpmigrator_mirrors标准流程升级 GreenPlum 数据库
    6. 安装 PostGIS 2.0 gppkg ( %> gppkg -i postgis-ossv2.0.3_pv2.0.1_gpdb4.3orca-rhel5-x86_64.gppkg)
    7. 针对步骤 1中具有 PostGIS 表的每个数据库运行postgis.sql脚本$GPHOME/share/postgresql/contrib/postgis-2.0
    8. pg_restore 在步骤 1中导出的所有表

    我们还在中间服务器上包括了一些此处未列出的步骤,以避免就地升级,因此我们有一个快速恢复点。这个过程有点麻烦,但到目前为止测试似乎表明它没有任何明显的问题。

    希望这可以帮助将来的人,

    约翰

    • 0

相关问题

  • 使用兼容级别升级 SQL Server 数据库

  • 在不弄乱端口的情况下升级 postgres?

  • 升级 SQL Server 2008 实例后是否应始终重新启动主机?

  • 我应该使用哪个版本的 MySQL?

  • PostgreSQL:8.3/8.4 接口变化?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve