Re: Cluster on NAS and data center. - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Cluster on NAS and data center.
Date
Msg-id CAMsr+YFBNGPYqTR5e2grbLAcMPUYy_dtxDkFiNgm+TE89SO36Q@mail.gmail.com
Whole thread Raw
In response to Cluster on NAS and data center.  (Krzysztof Kaczkowski <grafvader@gmail.com>)
Responses Re: Cluster on NAS and data center.  (Krzysztof Kaczkowski <grafvader@gmail.com>)
Re: Cluster on NAS and data center.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 4 July 2016 at 17:33, Krzysztof Kaczkowski <grafvader@gmail.com> wrote:

Hello everyone,

Right now we have PostgreSQL on Windows Server (main data center) and cluster is placed on NAS. We have emergency data center on UNIX architecture. We want that emergency data center could continue work on PostgreSQL cluster that has been used by Windows PostgreSQL.

We know that standard PostgreSQL is not able to use cluster created on different OS. We think that recompilation PostgreSQL with some specific flags. This should give us compatibility of cluster on different Systems. We see a small differences in cluster files on binary level. Can You help us pick proper compilation flags?


I wouldn't recommend that, and it might be pretty tricky.

Windows is an LLP64 architecture, and *nix is usually LP64. Because PostgreSQL's data directory format is directly tied to the size of data types in the host operating system this might cause you problems. See http://stackoverflow.com/a/384672/398670 . sizeof(long) will differ.

I'd love to break that particular assumption if/when an on-disk format break is done, since it's very unfortunate that PostgreSQL on one architecture/OS won't read data directories from another architecture/OS. But for now we're fairly stuck with it AFAIK.

Why can'y you just deploy a Windows backup cluster?

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

pgsql-hackers by date:

Previous
From: Krzysztof Kaczkowski
Date:
Subject: Cluster on NAS and data center.
Next
From: Krzysztof Kaczkowski
Date:
Subject: Re: Cluster on NAS and data center.