Re: PgStat_HashKey padding issue when passed by reference
От | Michael Paquier |
---|---|
Тема | Re: PgStat_HashKey padding issue when passed by reference |
Дата | |
Msg-id | aMtFBuUNv7O0DYN6@paquier.xyz обсуждение исходный текст |
Ответ на | Re: PgStat_HashKey padding issue when passed by reference (Sami Imseih <samimseih@gmail.com>) |
Ответы |
Re: PgStat_HashKey padding issue when passed by reference
|
Список | pgsql-hackers |
On Tue, Sep 16, 2025 at 02:38:20PM -0500, Sami Imseih wrote: > 7d85d87f4d5c35 added code to clear the padding bytes with memset > in anticipation that the key could be changed in the future, in a way > that padding will be introduced. Yep. The argument raised on this thread with the requirement of the key being passed by reference has made me change my mind, because I did not thing that valgrind would complain with that. So yes, I'm backpedalling a bit. Sorry for the confusion. > So, if we are changing thoughts on > this, we should add additional comments next to > ``` > + * NB: We assume that this struct contains no padding. > ``` > to enforce that the hash stored in objid should be used to > support additional fields, rather than adding a field directly > into the key. Hmm. Do you have a specific suggestion for enhancement? I can think about something like this wording: "NB: We assume that this struct contains no padding. The 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." More suggestions or a better sentence are of course welcome. > Will help future patch reviews/designs. Cool, thanks. -- Michael
Вложения
В списке pgsql-hackers по дате отправления: