mirror of https://github.com/citusdata/citus.git
Use HASH_STRINGS explicitly in hash functions
Postgres expects to set the HASH_STRINGS explicitly in case of the default behaivor for string hash function. Postgres Commit b3817f5f774663d55931dd4fab9c5a94a15ae7abpull/5209/head
parent
5930378f61
commit
96833e2b8f
|
@ -132,7 +132,7 @@ columnar_init_write_state(Relation relation, TupleDesc tupdesc,
|
|||
"Column Store Write State Management Context",
|
||||
ALLOCSET_DEFAULT_SIZES);
|
||||
HASHCTL info;
|
||||
uint32 hashFlags = (HASH_ELEM | HASH_CONTEXT);
|
||||
uint32 hashFlags = (HASH_ELEM | HASH_STRINGS | HASH_CONTEXT);
|
||||
memset(&info, 0, sizeof(info));
|
||||
info.keysize = sizeof(Oid);
|
||||
info.entrysize = sizeof(WriteStateMapEntry);
|
||||
|
|
|
@ -135,7 +135,13 @@ ListToHashSet(List *itemList, Size keySize, bool isStringList)
|
|||
info.entrysize = keySize;
|
||||
info.hcxt = CurrentMemoryContext;
|
||||
|
||||
if (!isStringList)
|
||||
if (isStringList)
|
||||
{
|
||||
#if PG_VERSION_NUM >= PG_VERSION_14
|
||||
flags |= HASH_STRINGS;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
flags |= HASH_BLOBS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue