| From: | Antonin Houska <ah(at)cybertec(dot)at> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Tomas Vondra <tomas(at)vondra(dot)me>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>, Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Treat <rob(at)xzilla(dot)net> |
| Subject: | Re: Adding REPACK [concurrently] |
| Date: | 2026-04-09 06:59:00 |
| Message-ID: | 5807.1775717940@localhost |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Antonin Houska <ah(at)cybertec(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Xuneng Zhou | 2026-04-09 07:04:08 | Re: Bug: WAIT FOR LSN crashes with assertion failure inside PL/pgSQL DO blocks and procedures |
| Previous Message | Lakshmi N | 2026-04-09 06:47:48 | Re: DOCS: pg_plan_advice minor doc fixes |