Re: PgStat_HashKey padding issue when passed by reference

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PgStat_HashKey padding issue when passed by reference
Date: 2025-09-09 02:36:52
Message-ID: CAA5RZ0v8AfZxTKnhyEB_tvfXBhtn1Dcvo=t=eOMfGKYNOZb3kQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Exactly. Hence my proposal of static assertion is doing exactly the
> job I want it to do :)

But my concern is the flexibility of this approach. If someone is to add an
OID field next, they will not be able to as that will be introducing
padding.
On the other hand, passing the key by reference and documenting the reason
in
pgstat_shmem.c will not lose this flexibility.

--
Sami

>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sutou Kouhei 2025-09-09 02:50:14 Re: Make COPY format extendable: Extract COPY TO format implementations
Previous Message Michael Paquier 2025-09-09 02:29:04 Re: PgStat_HashKey padding issue when passed by reference