Re: [dynahash] do not refill the hashkey after hash_search

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, Junwang Zhao <zhjwpku(at)gmail(dot)com>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [dynahash] do not refill the hashkey after hash_search
Date: 2023-10-25 05:21:32
Message-ID: 908921.1698211292@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

John Naylor <johncnaylorls(at)gmail(dot)com> writes:
> I'd prefer just adding "Assert(hentry->event == oldn);" and declaring
> hentry PG_USED_FOR_ASSERTS_ONLY.

I'm not aware of any other places where we have Asserts checking
that hash_search() honored its contract. Why do we need one here?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2023-10-25 05:47:20 Re: Guiding principle for dropping LLVM versions?
Previous Message John Naylor 2023-10-25 05:12:58 Re: [dynahash] do not refill the hashkey after hash_search