Re: HASH_FIXED_SIZE flag gets lost when attaching to existing hash table
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Aidar Imamov <a.imamov@postgrespro.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-07-25T15:02:28Z
Lists: pgsql-hackers
Aidar Imamov <a.imamov@postgrespro.ru> writes: > Thank's, I agree with you. > Attaching an edited version of the patch. Re-reading this in the light of morning, I realized that it can be done even more simply: let's just move isfixed to the shared struct, rather than keep two copies. The argument for two copies of keysize et al is that they're used in hot code paths. But element_alloc() had better not be a hot code path for a shared hash table, so I don't think that argument has force for isfixed. Pushed with that adjustment. I didn't back-patch, because we've not heard complaints about people running out of shmem on Windows. If there is anybody running a workload where this would matter, they might be less happy not more happy about the behavior changing in a minor release. regards, tom lane
Commits
-
Fix dynahash's HASH_FIXED_SIZE ("isfixed") option.
- 5457ea46d181 19 (unreleased) landed