0

我正在使用 pg_upgrade 将数据从 v11 移动到 v14,但由于一个数据库而失败。

在运行升级之前,我会检查集群兼容性,这看起来不错。下面是日志。

pg_upgrade -d /Users/Pro/pg_backup/postgres.old -D /usr/local/var/postgres/ -b /usr/local/Cellar/postgresql@11/11.14_1/bin/ -B /usr/local/Cellar/postgresql/14.1_1/bin --link --check
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok
Checking database user is the install user                  ok
Checking database connection settings                       ok
Checking for prepared transactions                          ok
Checking for system-defined composite types in user tables  ok
Checking for reg* data types in user tables                 ok
Checking for contrib/isn with bigint-passing mismatch       ok
Checking for user-defined encoding conversions              ok
Checking for user-defined postfix operators                 ok
Checking for tables WITH OIDS                               ok
Checking for invalid "sql_identifier" user columns          ok
Checking for presence of required libraries                 ok
Checking database user is the install user                  ok
Checking for prepared transactions                          ok
Checking for new cluster tablespace directories             ok

*Clusters are compatible*

但是当我在没有检查的情况下运行时,它会退出并显示以下错误消息..

"/usr/local/Cellar/postgresql/14.1_1/bin/pg_restore" --host /usr/local/Cellar/postgresql/14.1_1/bin --port 50432 --username Pro --create --exit-on-error --verbose --dbname template1 "pg_upgrade_dump_4552187.custom" >> "pg_upgrade_dump_4552187.log" 2>&1

*failure*
There were problems executing ""/usr/local/Cellar/postgresql/14.1_1/bin/pg_restore" --host /usr/local/Cellar/postgresql/14.1_1/bin --port 50432 --username Pro --create --exit-on-error --verbose --dbname template1 "pg_upgrade_dump_4552187.custom" >> "pg_upgrade_dump_4552187.log" 2>&1"

Consult the last few lines of "pg_upgrade_dump_4552187.log" for
the probable cause of the failure.
Failure, exiting
"/usr/local/Cellar/postgresql/14.1_1/bin/pg_ctl" -w -D "/usr/local/var/postgres" -o "" -m fast stop >> "pg_upgrade_server.log" 2>&1

当我检查日志文件时没有错误,但这就是最后几行所说的

-- For binary upgrade, set toast's relfrozenxid and relminmxid
UPDATE pg_catalog.pg_class
SET relfrozenxid = '3451702', relminmxid = '11832'
WHERE oid = '4552289';

有什么办法可以跳过这个数据库或绕过错误pg_upgrade吗?

4

0 回答 0