From: Pavan Deolasee Date: Thu, 5 May 2016 03:48:34 +0000 (+0530) Subject: Correct shared memory size calculation for Shared Queue hashtable. X-Git-Tag: XL9_5_R1_1~13 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=0be29cc949fcbddfec8d32ec5fafdfc3398bb1ce;p=postgres-xl.git Correct shared memory size calculation for Shared Queue hashtable. --- diff --git a/src/backend/pgxc/squeue/squeue.c b/src/backend/pgxc/squeue/squeue.c index 6b96208fa9..09700c1af3 100644 --- a/src/backend/pgxc/squeue/squeue.c +++ b/src/backend/pgxc/squeue/squeue.c @@ -243,13 +243,10 @@ SharedQueuesInit(void) Size SharedQueueShmemSize(void) { - Size sq_size; Size sqs_size; - sq_size = mul_size(NUM_SQUEUES, SQUEUE_SIZE); sqs_size = mul_size(NUM_SQUEUES, SQUEUE_SYNC_SIZE); - - return add_size(sq_size, sqs_size); + return add_size(sqs_size, hash_estimate_size(NUM_SQUEUES, SQUEUE_SIZE)); } /*