Re: Small optimization with expanding dynamic hash table

cca5507 <cca5507@qq.com>

From: cca5507 <cca5507@qq.com>
To: Rahila Syed <rahilasyed90@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-08T07:16:57Z
Lists: pgsql-hackers
&gt;&nbsp;Will this still work if new_bucket is not equal to hctl-&gt;low_mask + 1?Yes, for example:


low_mask: 0x011, high_mask: 0x111, old_bucket: 0x010, new_bucket: 0x110


The old_bucket's hash value like 0x***010 or 0x***110, the later is in the old_bucket is because we didn't have new_bucket before, so only hash value like 0x***110 needs&nbsp;relocation: hashvalue &amp; (low_mask + 1) != 0


--
Regards,
ChangAo Chen