Re: pg_controldata doesn't report 64/32bit? - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: pg_controldata doesn't report 64/32bit?
Date
Msg-id 873audpwmm.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: pg_controldata doesn't report 64/32bit?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_controldata doesn't report 64/32bit?  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Josh Berkus <josh@agliodbs.com> writes:
>> I've just noticed that pg_controldata doesn't say anything about whether 
>> the database is 64-bit or 32-bit.
>
> That's because there is no such concept.

I think the relevant concept is whether Datum is 32-bit or 64-bit wide.

My first thought was that surely the structure would be massively different on
a 64-bit architecture though? But actually I'm not sure that's true. There's
an Oid in the checkpoint record which is an "unsigned int" so at least ILP64
architectures would be distinguished but I can't find any "long" members or
pointers so an LP64 architecture actually would have the same member sizes as
a 32-bit architecture.

So if there's an LP64 architecture which has the same maxalign (presumably
64-bit for doubles) as its 32-bit cousin then it's actually possible we
wouldn't notice?

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about
EnterpriseDB'sPostgreSQL training!
 


pgsql-hackers by date:

Previous
From: "Jonah H. Harris"
Date:
Subject: Re: [DOCS] "distributed checkpoint"
Next
From: Gregory Stark
Date:
Subject: Re: pg_controldata doesn't report 64/32bit?