pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #17143: when the CPU is different, the index on the primary is ok but the index on the standby is damaged
3+ messages / 3 participants
[nested] [flat]

* BUG #17143: when the CPU is different, the index on the primary is ok but the index on the standby is damaged
@ 2021-08-13 14:02  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 2 replies; 3+ messages in thread

From: PG Bug reporting form @ 2021-08-13 14:02 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: lcj122@163.com

The following bug has been logged on the website:

Bug reference:      17143
Logged by:          lcj
Email address:      lcj122@163.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.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #17143: when the CPU is different, the index on the primary is ok but the index on the standby is damaged
@ 2021-08-13 15:04  David G. Johnston <david.g.johnston@gmail.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 0 replies; 3+ messages in thread

From: David G. Johnston @ 2021-08-13 15:04 UTC (permalink / raw)
  To: lcj122@163.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>

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

> The following bug has been logged on the website:
>
> Bug reference:      17143
> Logged by:          lcj
> Email address:      lcj122@163.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.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #17143: when the CPU is different, the index on the primary is ok but the index on the standby is damaged
@ 2021-08-13 15:07  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2021-08-13 15:07 UTC (permalink / raw)
  To: lcj122@163.com; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> 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.

You should not expect that to work.  Physical replication requires
identical hardware architectures, not to mention mostly-the-same
operating system software.  (The most usual gotcha for cross-system
replication is different locale sort orders.)

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-08-13 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 14:02 BUG #17143: when the CPU is different, the index on the primary is ok but the index on the standby is damaged PG Bug reporting form <noreply@postgresql.org>
2021-08-13 15:04 ` David G. Johnston <david.g.johnston@gmail.com>
2021-08-13 15:07 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox