Re: Centralised architecture detection

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Greg Burd" <greg(at)burd(dot)me>
Cc: "Thomas Munro" <thomas(dot)munro(at)gmail(dot)com>, Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Andres Freund" <andres(at)anarazel(dot)de>, "Lukas Fittl" <lukas(at)fittl(dot)com>, "John Naylor" <johncnaylorls(at)gmail(dot)com>, "Bryan Green" <dbryan(dot)green(at)gmail(dot)com>
Subject: Re: Centralised architecture detection
Date: 2026-07-01 13:20:32
Message-ID: 3138572.1782912032@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Greg Burd" <greg(at)burd(dot)me> writes:
> On Tue, Jun 30, 2026, at 9:11 PM, Tom Lane wrote:
>> Based on that thread, I'm thinking
>> #if SIZEOF_VOID_P == 8

> I don't see SIZEOF_VOID_P but I do find:
> #define __SIZEOF_POINTER__ 8

SIZEOF_VOID_P is set up by autoconf/meson via pg_config.h.
So it will be available here. I'd rather use our own
symbol because, if other arches emerge with similar issues,
we can be sure of having a common pattern to follow.

I do see __SIZEOF_POINTER__ getting predefined locally
(in recent gcc and clang on x86_64), but it's far from clear
to me how standard, or well-documented, that macro is.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2026-07-01 13:25:23 Re: Proposal: Conflict log history table for Logical Replication
Previous Message torikoshia 2026-07-01 13:09:52 Re: RFC: Logging plan of the running query