From 1d22d51fc918d21c15121e71052edf8babb27f39 Mon Sep 17 00:00:00 2001 From: Pavan Deolasee Date: Mon, 28 Mar 2016 17:04:53 +0530 Subject: [PATCH] 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. --- src/backend/pgxc/pool/poolmgr.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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); -- 2.39.5