Re: Cluster on NAS and data center.

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Krzysztof Kaczkowski <grafvader(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cluster on NAS and data center.
Date: 2016-07-04 10:06:45
Message-ID: CAMsr+YFBNGPYqTR5e2grbLAcMPUYy_dtxDkFiNgm+TE89SO36Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4 July 2016 at 17:33, Krzysztof Kaczkowski <grafvader(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Krzysztof Kaczkowski 2016-07-04 10:36:02 Re: Cluster on NAS and data center.
Previous Message Krzysztof Kaczkowski 2016-07-04 09:33:07 Cluster on NAS and data center.