Re: HASH_FIXED_SIZE flag gets lost when attaching to existing hash table - Mailing list pgsql-hackers

From Tom Lane
Subject Re: HASH_FIXED_SIZE flag gets lost when attaching to existing hash table
Date
Msg-id 1922301.1753455748@sss.pgh.pa.us
Whole thread Raw
In response to Re: HASH_FIXED_SIZE flag gets lost when attaching to existing hash table  (Aidar Imamov <a.imamov@postgrespro.ru>)
List 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



pgsql-hackers by date:

Previous
From: Vik Fearing
Date:
Subject: Re: Proposal: QUALIFY clause
Next
From: Hironobu SUZUKI
Date:
Subject: [PATCH] Avoid unnecessary code execution in Instrument.c when TIMING is FALSE