Re: Adding REPACK [concurrently] - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Adding REPACK [concurrently]
Date
Msg-id 3074023.1775666853@sss.pgh.pa.us
Whole thread Raw
In response to Re: Adding REPACK [concurrently]  (Antonin Houska <ah@cybertec.at>)
Responses Re: Adding REPACK [concurrently]
List pgsql-hackers
Antonin Houska <ah@cybertec.at> writes:
> Tomas Vondra <tomas@vondra.me> wrote:
>> while building on a rpi5 with a 32-bit system, I'm getting these warnings:
>> ...
>> I'm not sure if it's just the compiler (gcc 14.2) being pesky, or if
>> it's an actual issue. The repack tests seem to pass fine.

Several 32-bit BF animals are showing these too (so far: dodo,
grison, and turaco).

> We already introduced this definition above in the function to suppress this
> kind of warning

>     union
>     {
>         alignas(int32) varlena hdr;
>         char        data[sizeof(void *)];
>     }            chunk_header;

> The problem on a 32-bit system probably is that sizeof(void *) is 4. We need
> some other constant. Maybe (sizeof(varlena) + 1) ...

This seems unnecessarily Rube Goldberg-ish already.  Why not just

    uint64    chunk_header;

It will not hurt anything if the variable has more-than-required
alignment.  And it'd be better if it were the same size everywhere.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: bump minimum supported version of psql and pg_{dump,dumpall,upgrade} to v10
Next
From: Ilia Evdokimov
Date:
Subject: Re: Hash-based MCV matching for large IN-lists