Re: HASH_FIXED_SIZE flag gets lost when attaching to existing hash table

2025-07-25 Thread Tom Lane
Aidar Imamov 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 keysiz

Re: HASH_FIXED_SIZE flag gets lost when attaching to existing hash table

2025-07-25 Thread Aidar Imamov
On 2025-07-24 20:24, Tom Lane wrote: Aidar Imamov writes: Recently, while working with hash tables in dynahash.c, I noticed something weird. When a hash table is already created in shared memory, and the another process calls hash_create attempting to attach to it, it seems like the HASH_FIXED_

Re: HASH_FIXED_SIZE flag gets lost when attaching to existing hash table

2025-07-24 Thread Tom Lane
Aidar Imamov writes: > Recently, while working with hash tables in dynahash.c, I noticed > something weird. > When a hash table is already created in shared memory, and the another > process > calls hash_create attempting to attach to it, it seems like the > HASH_FIXED_SIZE > flag gets lost. Y

HASH_FIXED_SIZE flag gets lost when attaching to existing hash table

2025-07-24 Thread Aidar Imamov
Hi hackers, Recently, while working with hash tables in dynahash.c, I noticed something weird. When a hash table is already created in shared memory, and the another process calls hash_create attempting to attach to it, it seems like the HASH_FIXED_SIZE flag gets lost. For example, if you st