I'm currently deploying an application to a Kubernetes cluster that has x86 and ARM machines. My applications are usually packaged to support both CPU architectures.
However, this application depends on Postgres. Without special configuration, Kubernetes could schedule it to run on either the x86 machines or the ARM machines, and the data directory would be directly moved between them.
Right now I've set it up to only run it on one kind of machine, to prevent any issues with binary incompatibility of the data files. I know that there are such incompatibilities between major versions of Postgres.
However, I'm curious: if I'm using the same version of Postgres on all the machines, then is it possible to use the same on-disk data files from different architectures -- for example, inserting data on an x86 machine, then stopping the server process, and moving the data directory to an ARM machine and reading the data there?