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-18 16:52:05
Message-ID: CAA5RZ0vgLEXcMYqwBSSqxmG3bneQ822Z4mP6AhhDiuvU9tfPTQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.

I was not a fan of it, when my idea was to allow flexibility in adding
more fields to the key. However, I am now convinced objid should be
good enough.

v2 looks good to me. Not sure if there are edge cases in which
the assert will succeed even with padding (I can't think of any way
that will be possible), so for now what you have seems good enough.

--
Sami

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonathan S. Katz 2025-09-18 16:59:13 Re: PG 18 relnotes and RC1
Previous Message Andres Freund 2025-09-18 16:48:45 Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)