试图找到一条迁移路线PostgreSQL 10.6
to postgreSQL 11.1
.
Using pg_upgrade
,从两个版本,给我错误。从11.1
我认为这将用于将过时的表格转换为货币:
$ /usr/local/Cellar/postgresql/11.1/bin/pg_upgrade -v \
> -b /usr/local/Cellar/postgresql@10/10.6/bin \
> -B /usr/local/Cellar/postgresql/11.1/bin \
> -d /usr/local/var/postgres \
> -D /usr/local/var/postgres
Running in verbose mode
Performing Consistency Checks
-----------------------------
Checking cluster versions
This utility can only upgrade to PostgreSQL version 11.
Failure, exiting
From 10.6
,预期结果,因为它看不到前向结构:
/usr/local/Cellar/postgresql@10/10.6/bin/pg_upgrade -v \
> -b /usr/local/Cellar/postgresql@10/10.6/bin \
> -B /usr/local/Cellar/postgresql/11.1/bin \
> -d /usr/local/var/postgres \
> -D /usr/local/var/postgres
Running in verbose mode
Performing Consistency Checks
-----------------------------
Checking cluster versions
New cluster data and binary directories are from different major versions.
Failure, exiting
如何迁移表以使用版本11.1
适当地?我假设后一个版本是要使用的版本,并且我的目录是有效的。
是的,您需要使用升级到的版本(11.1)的 pg_upgrade。
您的 -b 和 -B 选项看起来不错。但是,您的 -d 和 -D 不能相同!配置位置还定义数据位置,并且这些位置不能相同。您需要使用 -D 指定初始化的 11.1 集群的配置位置。
如果您不希望 pg_upgrade 复制所有数据,请使用 --link 选项来使用硬链接而不是复制。升级后,您可以删除旧的数据目录。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)