*/
{
{"shared_queues", PGC_POSTMASTER, RESOURCES_MEM,
- gettext_noop("Sets the number of shared memory queues used by the distributed executor."),
+ gettext_noop("Sets the number of shared memory queues used by the "
+ "distributed executor, minimum 1/4 of max_connections."),
NULL
},
&NSQueues,
{
{"shared_queue_size", PGC_POSTMASTER, RESOURCES_MEM,
- gettext_noop("Sets the amount of memory allocated for a shared memory queue."),
+ gettext_noop("Sets the amount of memory allocated for a shared"
+ " memory queue per datanode."),
NULL,
GUC_UNIT_KB
},
&SQueueSize,
- 64, 1, MAX_KILOBYTES,
+ 32, 1, MAX_KILOBYTES,
NULL, NULL, NULL
},
extern PGDLLIMPORT int SQueueSize;
/* Fixed size of shared queue, maybe need to be GUC configurable */
-#define SQUEUE_SIZE ((long) SQueueSize * 1024L)
+#define SQUEUE_SIZE ((long) SQueueSize * MaxDataNodes * 1024L)
/* Number of shared queues, maybe need to be GUC configurable */
-#define NUM_SQUEUES ((long) NSQueues)
+#define NUM_SQUEUES Max((long) NSQueues, MaxConnections / 4)
#define SQUEUE_KEYSIZE (64)