Re: BUG #17143: when the CPU is different, the index on the primary is ok but the index on the standby is damaged

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: lcj122(at)163(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17143: when the CPU is different, the index on the primary is ok but the index on the standby is damaged
Date: 2021-08-13 15:04:38
Message-ID: CAKFQuwZAVi6Q2McXC0OHk4-cVhRsCHXsUh0t+3_3U-HfrO3jSQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Aug 13, 2021 at 7:56 AM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 17143
> Logged by: lcj
> Email address: lcj122(at)163(dot)com
> PostgreSQL version: 11.5
> Operating system: liunx
> Description:
>
> Hello, I have encountered a problem in building a primary and standby
> cluster using physical streaming replication on different CPU machines.
> We created the primary on the x86 machine, and created the standby on the
> arm machine. Now using amcheck to check the index, we find that the same
> index is no problem on the primary, but the standby is indeed damaged.
> The error reported on the standby machine is as follows:
> ERROR: item order invariant violated for index "xxxx"
> DETAIL: Lower index tid=(965,50) (points to heap tid=(13502,8)) higher
> index tid=(965,51) (points to heap tid=(40017,19)) page lsn=392/59A2C8.
>
> Does anyone know the reason? thanks.
>
>
I cannot explain the technical reason for this well but physical
replication is not supported, and not generally expected to work, when the
primary and secondary are not essentially the same. A different cpu
architecture is decidedly a material difference. In particular, this
property falls into "hardware architecture" (it is in fact the property
around which "architecture" is defined) which is specifically called out in
the docs:

https://www.postgresql.org/docs/current/warm-standby.html#STANDBY-PLANNING

"""
Hardware need not be exactly the same, but experience shows that
maintaining two identical systems is easier than maintaining two dissimilar
ones over the lifetime of the application and system. In any case the
hardware architecture must be the same — shipping from, say, a 32-bit to a
64-bit system will not work.
"""

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-08-13 15:07:19 Re: BUG #17143: when the CPU is different, the index on the primary is ok but the index on the standby is damaged
Previous Message PG Bug reporting form 2021-08-13 14:02:23 BUG #17143: when the CPU is different, the index on the primary is ok but the index on the standby is damaged