Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y75UZ-00032H-SG for pgsql-admin@arkaria.postgresql.org; Fri, 02 Jan 2015 16:54:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y75UZ-0006Uk-BP for pgsql-admin@arkaria.postgresql.org; Fri, 02 Jan 2015 16:54:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y75UX-0006SV-OS for pgsql-admin@postgresql.org; Fri, 02 Jan 2015 16:54:25 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Y75UT-00018J-QW for pgsql-admin@postgresql.org; Fri, 02 Jan 2015 16:54:24 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1Y75UP-0001rq-HA; Fri, 02 Jan 2015 11:54:17 -0500 Date: Fri, 2 Jan 2015 11:54:17 -0500 From: Bruce Momjian To: Craig Ringer Cc: Tom Lane , girish R G peetle , pgsql-admin Subject: Re: PostgreSQL file system based restore from Linux to Windows Message-ID: <20150102165417.GA22220@momjian.us> References: <29289.1420007314@sss.pgh.pa.us> <54A6796F.9070802@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54A6796F.9070802@2ndquadrant.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On Fri, Jan 2, 2015 at 06:56:47PM +0800, Craig Ringer wrote: > On 12/31/2014 02:28 PM, Tom Lane wrote: > > It might happen to work, if you're talking the same Intel-ish CPU type > > on both ends ... but if it fails, don't call us. > > It might for 32-bit, but I'm pretty sure it's not going to for 64-bit > because Windows is LLP64 and Linux is LP64, so sizeof(long) differs. See > http://en.wikipedia.org/wiki/64-bit_computing . > > (Yet another area where Windows is annoyingly and pointlessly different, > like use of UTF16 instead of UTF-8, though at least there they have the > excuse of doing it first.) > > Just use a Linux box or a virtual machine to start a copy of the > database, then pg_dump -Fc it and pg_restore to a new instance on the > Windows box. I would also worry about collation differences between Linux and Windows. We have seen index problems with OS upgrades causing mismatches, so I assume Windows and Linux might have even larger mismatches. We have discussed a way to test for mismatches but have no solution yet. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin