Add an assert to the length of shared hashtable name - Mailing list pgsql-hackers

From Xiaoran Wang
Subject Add an assert to the length of shared hashtable name
Date
Msg-id SN6PR05MB44626B969DC352BD24370915BA529@SN6PR05MB4462.namprd05.prod.outlook.com
Whole thread Raw
List pgsql-hackers
 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

pgsql-hackers by date:

Previous
From: "wangw.fnst@fujitsu.com"
Date:
Subject: RE: Data is copied twice when specifying both child and parent table in publication
Next
From: bt22nakamorit
Date:
Subject: Differentiate MERGE queries with different structures