postgresql - 升级到想要使用校验和的 postgres 10

标签 postgresql upgrade postgresql-10

我有一个 postgresql 9.3 实例,我想升级到 postgresql 10。我有一个我认为应该有效的命令,但它包含校验和。我的旧实例没有启用校验和(它甚至可以吗?忘了太久以前了)这阻止了我的试运行正常工作。

错误信息

Performing Consistency Checks on Old Live Server
------------------------------------------------
Checking cluster versions                                   ok

old cluster does not use data checksums but the new one does
Failure, exiting

我的命令去掉了真实路径

time ${PGBINNEW}/pg_upgrade --old-bindir=${PGBINOLD} --new-bindir=${PGBINNEW} --old-datadir=${PGDATAOLD} --new-datadir=${PGDATANEW} --old-port=${PGPORT} --new-port=${PGPORT} --jobs=$(nproc | awk '{ {print ($1 > 4) ? 4 : ($1 == 1 ? 1 : $1 - 1)} }') --link --username=postgres --check

我该怎么做才能解决这个问题?

最佳答案

在 pg_upgrade 期间发生在我身上。我只是用这个禁用了校验和:

$ pg_checksums -d /var/lib/postgres/data/
pg_checksums: syncing data directory
pg_checksums: updating control file
Checksums disabled in cluster

在我的例子中/var/lib/postgres/data 是数据目录。您的可能有所不同。

关于postgresql - 升级到想要使用校验和的 postgres 10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52104705/

相关文章:

php - 如何在 CakePHP 3 中使用 postGIS

json - 在postgresql中将行转换为json对象

asp.net-mvc - ASP.NET MVC 升级到 Beta : IControllerFactory is defined in an assembly that is not referenced

postgresql - 将 PostgreSQL 列转换为存储类型

postgresql - 错误 : operator does not exist: timestamp without time zone + integer

sql - 有 3 个实体,根据其他 2 个实体的关系数(计数)得到第三个实体

sql - 如何在 Rails 中编写以下查询?

ruby-on-rails - Rails/Postgres 嵌套 JSON 查询

java - 将 SQLite 数据库从一个版本升级到另一个版本?

c# - .NET 框架升级指南