Re: PgStat_HashKey padding issue when passed by reference - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: PgStat_HashKey padding issue when passed by reference
Date
Msg-id aMtzJxPHu3Ddx7fu@paquier.xyz
Whole thread Raw
In response to Re: PgStat_HashKey padding issue when passed by reference  (Sami Imseih <samimseih@gmail.com>)
Responses Re: PgStat_HashKey padding issue when passed by reference
List pgsql-hackers
On Wed, Sep 17, 2025 at 07:04:36PM -0500, Sami Imseih wrote:
> "NB: We assume that this struct contains no padding.  Also, 8 bytes
>  allocated for the object ID are good enough to ensure the uniqueness
> of the hash key, hence the addition of new fields is not recommended."

Works for me.

> Also, what about we also add the assert as done earlier in this thread [0]
> to ensure that the struct indeed does not have padding?

I still want to add it, but it also seemed like you were not much a
fan of it, so I did not really want to push forward with something
that was not loved.  :D

Addressing your points, attached is an updated patch labelled v2.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: pgbench: remove an unused function argument
Next
From: Fujii Masao
Date:
Subject: Re: pg_restore --no-policies should not restore policies' comment