pgsql-general
❮
physical replication compatibilty
- Jump to comment-1Jatinder Singh Sandhu<jitu.sandhu@gmail.com>Apr 15, 2026, 10:06 PM UTCDear PostgreSQL Community,
I am currently planning a major version upgrade from PostgreSQL 16 to
PostgreSQL 17. I have three node patroni cluster. While I am aware that
logical replication is the standard approach for cross-version migrations,
I am curious about the feasibility of physical streaming replication in
this specific scenario.
Specifically, I would like to clarify:
I understand that WAL formats and system catalogs typically change between1. Is physical streaming replication backward compatible between these two major versions? 2. Since many data files remain consistent between versions, is there any supported method to leverage physical block-level replication to minimize the initial data synchronization time before a cutover?
major releases, but I wanted to confirm if there are any modern workarounds
or "late-binding" techniques available in the v17 ecosystem.
Thank you for your time and expertise.
Best regards,- Jump to comment-1David G. Johnston<david.g.johnston@gmail.com>Apr 15, 2026, 10:17 PM UTCOn Wed, Apr 15, 2026 at 3:06 PM Jatinder Singh Sandhu <jitu.sandhu@gmail.com>
wrote:Is physical streaming replication backward compatible between these two
pg_upgrade can perform this kind of physical transfer upgrade.
major versions?
Physical replication is only reliable when the source and target are
basically identical in platform and software. It cannot be expected to
work between major versions.
David J. - Jump to comment-1Adrian Klaver<adrian.klaver@aklaver.com>Apr 15, 2026, 10:20 PM UTCOn 4/15/26 3:06 PM, Jatinder Singh Sandhu wrote:
Dear PostgreSQL Community,
I am currently planning a major version upgrade from PostgreSQL 16 to > PostgreSQL 17. I have three node patroni cluster. While I am aware that > logical replication is the standard approach for cross-version > migrations, I am curious about the feasibility of physical streaming > replication in this specific scenario.
Specifically, I would like to clarify:
1. Is physical streaming replication backward compatible between these
two major versions?
2. Since many data files remain consistent between versions, is there
any supported method to leverage physical block-level replication to
minimize the initial data synchronization time before a cutover?I understand that WAL formats and system catalogs typically change > between major releases, but I wanted to confirm if there are any modern > workarounds or "late-binding" techniques available in the v17 ecosystem.
Thank you for your time and expertise.
I think you are looking for:
https://www.postgresql.org/docs/17/pgupgrade.html
In particular this:
13. Upgrade streaming replication and log-shipping standby servers
Whether that will play well with the Patroni cluster or not is not something I can comment on.
It is covered below though:
https://patroni.readthedocs.io/en/latest/existing_data.html#major-upgrade-of-postgresql-versionBest regards,