The max size for the shared memory hash table name is SHMEM_INDEX_KEYSIZE - 1
 (shared hash table name is stored and indexed by ShmemIndex hash table,
 the key size of it is SHMEM_INDEX_KEYSIZE), but when the caller uses a
 longer hash table name, it doesn't report any error, instead it just
 uses the first SHMEM_INDEX_KEYSIZE chars as the hash table name.

 When some hash tables' names have the same prefix which is longer than
 (SHMEM_INDEX_KEYSIZE - 1), issues will come: those hash tables actually
 are created as the same hash table whose name is the prefix. So add the
 assert to prevent it.

Attachment: fix_shmem_hash_table_name_length.patch
Description: fix_shmem_hash_table_name_length.patch

Reply via email to