]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Simplify declaration of memcpy target
authorÁlvaro Herrera <alvherre@kurilemu.de>
Wed, 8 Apr 2026 20:58:56 +0000 (22:58 +0200)
committerÁlvaro Herrera <alvherre@kurilemu.de>
Wed, 8 Apr 2026 20:58:56 +0000 (22:58 +0200)
The existing one is understandable failing on (some?) 32-bit platforms.

Reported-by: Tomas Vondra <tomas@vondra.me>
Suggested-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/1c197f2d-49a2-4830-8dde-55867218b62d@vondra.me

src/backend/commands/repack.c

index 20dad22c4b7c344049eaaf03cc1e0c210a553024..58e3867246f1c1d8b0d0760ff89ea43f4f4a8605 100644 (file)
@@ -2710,11 +2710,7 @@ restore_tuple(BufFile *file, Relation relation, TupleTableSlot *slot)
                {
                        CompactAttribute *attr = TupleDescCompactAttr(desc, i);
                        varlena    *varlen;
-                       union
-                       {
-                               alignas(int32) varlena hdr;
-                               char            data[sizeof(void *)];
-                       }                       chunk_header;
+                       uint64          chunk_header;
                        void       *value;
                        Size            varlensz;