不同主要版本之间的 PostgreSQL 复制

PostgreSQL replication between different major versions

AFAIK documentation 状态:

In general, log shipping between servers running different major PostgreSQL release levels is not possible. It is the policy of the PostgreSQL Global Development Group not to make changes to disk formats during minor release upgrades, so it is likely that running different minor release levels on primary and standby servers will work successfully. However, no formal support for that is offered and you are advised to keep primary and standby servers at the same release level as much as possible.

但我的问题是:磁盘格式实际上在 9.4.9 和 9.5.6 之间发生了变化吗?

我们目前运行:

'next' 可能的步骤是使用此存储库中的版本:

http://apt.postgresql.org/pub/repos/apt/

我们目前的数据库大约是 2TB,所以我们想尝试一种类似复制的方法来实现更平滑的过渡,而不是使用完整的 pg_dump,这实际上需要相当长的时间数据库冻结。

does disk format actually changes between 9.4.9 and 9.5.6

是的。在即将到来的 PostgreSQL 10 之前,PostgreSQL 使用了一个古怪的版本方案,其中 "x.y" 是 "major" 版本,第三个数字是次要版本。

所以 9.4 和 9.5 是不同的主要版本。它们绝对不兼容磁盘。

要升级您可以:

  • 转储并重新加载
  • 使用pg_upgrade(官方推荐的方式)
  • 使用pglogical
  • 使用 Londiste