Re: Physical replication from x86_64 to ARM64

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: Jan Mußler <jan(dot)mussler(at)zalando(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Physical replication from x86_64 to ARM64
Date: 2021-09-14 14:11:25
Message-ID: 589011.1631628685@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Aleksander Alekseev <aleksander(at)timescale(dot)com> writes:
>> Initial experiments show no observable problems when copying PGDATA or in
>> fact using physical streaming replication between the two CPU architectures.

> That's an interesting result. The topic of physical replication
> compatibility interested me much back in 2017 and I raised this question on
> PGCon [1]. As I recall the compatibility is not guaranteed, nor tested, and
> not going to be, because the community doesn't have resources for this.

Yeah. As far as the hardware goes, if you have the same endianness,
struct alignment rules, and floating-point format [1], then physical
replication ought to work. Where things get far stickier is if the
operating systems aren't identical, because then you have very great
risk of text sorting rules not being the same, leading to index
corruption [2]. In modern practice that tends to be a bigger issue
than the hardware, and we don't have any good way to check for it.

regards, tom lane

[1] all of which are checked by pg_control fields, btw
[2] https://wiki.postgresql.org/wiki/Locale_data_changes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dipesh Pandit 2021-09-14 14:20:43 Re: .ready and .done files considered harmful
Previous Message Andrey Borodin 2021-09-14 14:05:02 Re: Supply restore_command to pg_rewind via CLI argument