pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Paul Smith <paul@pscs.co.uk>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Using pg_upgrade to change from 32 to 64 bit.
Date: Thu, 11 Mar 2021 10:39:46 -0500
Message-ID: <2292521.1615477186@sss.pgh.pa.us> (raw)
In-Reply-To: <20210311145712.GE2469@momjian.us>
References: <33cc9b29-b14e-583e-88eb-32bc4006cc9d@pscs.co.uk>
	<20210311145712.GE2469@momjian.us>

Bruce Momjian <bruce@momjian.us> writes:
> On Thu, Mar 11, 2021 at 10:34:42AM +0000, Paul Smith wrote:
>> Just "for kicks" I decided to try to use pg_upgrade to do it (on a test
>> database).  The documentation seems to suggest that it won't work
>> "pg_upgrade does its best to make sure the old and new clusters are
>> binary-compatible, e.g., by checking for compatible compile-time settings,
>> *including 32/64-bit binaries*."
>> To my surprise, it seemed to work absolutely fine. I can start the new 64 bit
>> cluster, and a quick check shows everything working OK.

Yeah, it will (probably) work as long as maxAlign is the same.
Since on Intel hardware that's pretty nearly a free choice by the
compiler, it doesn't surprise me if 32- and 64-bit Windows builds
use the same value.

> Well, pg_upgrade checks all the pg_controldata fields that would affect
> compatibility, so I guess it does work.  pg_upgrade only really cares
> about the format of the database files, not the size of pointers used by
> the binary.

After some digging, I found where pg_upgrade checks that the clusters'
pg_control.maxAlign settings match.  However, it looks to me like
pg_control.floatFormat is never checked, which is a problem in theory
though I'm not sure there's any issue in practice, seeing how universal
IEEE floats are.  Perhaps more critical, it's not apparent to me where
or how pg_upgrade verifies that endianness is the same.

			regards, tom lane





view thread (3+ messages)

Message-ID: <2292521.1615477186@sss.pgh.pa.us>
Permalink:  ../2292521.1615477186@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2292521.1615477186@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bruce@momjian.us, paul@pscs.co.uk, pgsql-admin@lists.postgresql.org
  Subject: Re: Using pg_upgrade to change from 32 to 64 bit.
  In-Reply-To: <2292521.1615477186@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox