Cluster on NAS and data center.
Cluster on NAS and data center.
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?
Re: Cluster on NAS and data center.
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?
Re: Cluster on NAS and data center.
Hello,
About Your question, please do not ask. This infrastructure is an outcome of a very long talk with supervisors.
Back to the topic. I like the tricky part. Do You think there is some way to achieve this on compilation level or shall we search somewhere else? For example UNIX libraries or even change and recompile kernel?
Re: Cluster on NAS and data center.
Craig Ringer writes: > On 4 July 2016 at 17:33, Krzysztof Kaczkowski wrote: >> 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. Indeed. Aside from architectural differences, I'd be very afraid of differences in collation order (resulting in incompatible indexes on textual columns). You might be able to make it work if you only ever use "C" locale. But really, this is not and will never be considered supported usage, and if it fails, no one is going to say anything except "we warned you not to do that". regards, tom lane
Re: Cluster on NAS and data center.
I'm going to echo everyone else's sentiment though, and assert that what you are trying to do is really an insane idea. You might be able to make it appear like its working but as a DBA, I would have absolutely no confidence in using that server for disaster recovery.
If your company is saving money by not getting Windows licenses for your DR environment, you are far better off just saving one more license and making both your production and DR server be Linux builds.
- Matt K.
Re: Cluster on NAS and data center.
Hello,
Thanks to emails, we have achieved what we wanted. This is what we’ve done:
Compilation (for 32 bit version, initdb with locale=C):
CFLAGS="-mx32 -fexcess-precision=standard -O2"
CXXFLAGS="-mx32"configure --without-zlib --disable-float8-byval --without-readline --host=x86_64-linux-gnux32
We also have installed libx32.
Right now we received cluster that is fully manageable from both systems. Anyone see something dangerous with this compilation?
Re: Cluster on NAS and data center.
On Tue, Jul 5, 2016 at 7:46 AM, Krzysztof Kaczkowski wrote: > Thanks to emails, we have achieved what we wanted. This is what we’ve done: > > Compilation (for 32 bit version, initdb with locale=C): > > CFLAGS="-mx32 -fexcess-precision=standard -O2" > CXXFLAGS="-mx32" > > configure --without-zlib --disable-float8-byval --without-readline > --host=x86_64-linux-gnux32 > > We also have installed libx32. > > Right now we received cluster that is fully manageable from both systems. > Anyone see something dangerous with this compilation? That seems to cover a fair amount of territory, but it might be unwise to assume that there are no other issues. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company