From: Pavan Deolasee Date: Mon, 28 Mar 2016 11:34:53 +0000 (+0530) Subject: Correctly specify HASH_BLOBS while using nodeOid as a key for pooler hash X-Git-Tag: XL9_5_R1BETA2~11 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=e5953ba17cac492bed991d8619282fdbfa0d08cd;p=postgres-xl.git Correctly specify HASH_BLOBS while using nodeOid as a key for pooler hash tables. Without this, we were incorrectly using the default string copy/compare functions, thus later breaking things. --- diff --git a/src/backend/pgxc/pool/poolmgr.c b/src/backend/pgxc/pool/poolmgr.c index 0811e378fa..c73e1982ec 100644 --- a/src/backend/pgxc/pool/poolmgr.c +++ b/src/backend/pgxc/pool/poolmgr.c @@ -1781,7 +1781,6 @@ create_database_pool(const char *database, const char *user_name, const char *pg MemoryContext dbcontext; DatabasePool *databasePool; HASHCTL hinfo; - int hflags; elog(DEBUG1, "Creating a connection pool for database %s, user %s," " with pgoptions %s", database, user_name, pgoptions); @@ -1828,17 +1827,14 @@ create_database_pool(const char *database, const char *user_name, const char *pg /* Init node hashtable */ MemSet(&hinfo, 0, sizeof(hinfo)); - hflags = 0; hinfo.keysize = sizeof(Oid); hinfo.entrysize = sizeof(PGXCNodePool); - hflags |= HASH_ELEM; - hinfo.hcxt = dbcontext; - hflags |= HASH_CONTEXT; databasePool->nodePools = hash_create("Node Pool", MaxDataNodes + MaxCoords, - &hinfo, hflags); + &hinfo, + HASH_ELEM | HASH_CONTEXT | HASH_BLOBS); MemoryContextSwitchTo(oldcontext);