Re: Adding REPACK [concurrently]

Поиск
Список
Период
Сортировка
От Antonin Houska
Тема Re: Adding REPACK [concurrently]
Дата
Msg-id 5807.1775717940@localhost
обсуждение
Ответ на Re: Adding REPACK [concurrently]  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Antonin Houska <ah@cybertec.at> writes:

> > 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.

Indeed.

> 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.

That's certainly better. Thanks.

--
Antonin Houska
Web: https://www.cybertec-postgresql.com



В списке pgsql-hackers по дате отправления: