On Mon, Sep 08, 2025 at 09:20:14PM -0500, Sami Imseih wrote:
> The following will fail the assert since padding is needed for the
> new Oid member.
>
> @@ -53,6 +53,7 @@ typedef struct PgStat_HashKey
> {
> PgStat_Kind kind; /* statistics entry kind */
> Oid dboid; /* database
> ID. InvalidOid for shared objects. */
> + Oid field1;
> uint64 objid; /* object ID (table,
> function, etc.), or
>
> This will not fail the assert, since no padding is needed for the new member.
>
> @@ -53,6 +53,7 @@ typedef struct PgStat_HashKey
> {
> PgStat_Kind kind; /* statistics entry kind */
> Oid dboid; /* database
> ID. InvalidOid for shared objects. */
> + uint64 field1;
> uint64 objid; /* object ID (table,
> function, etc.), or
Exactly. Hence my proposal of static assertion is doing exactly the
job I want it to do :)
--
Michael