mirror of https://github.com/citusdata/citus.git
Add guc variable for shard count
parent
98e0648d40
commit
d04f4f5935
|
@ -55,6 +55,7 @@
|
|||
|
||||
|
||||
/* Shard related configuration */
|
||||
int ShardCount = 32;
|
||||
int ShardReplicationFactor = 2; /* desired replication factor for shards */
|
||||
int ShardMaxSize = 1048576; /* maximum size in KB one shard can grow to */
|
||||
int ShardPlacementPolicy = SHARD_PLACEMENT_ROUND_ROBIN;
|
||||
|
|
|
@ -332,6 +332,17 @@ RegisterCitusConfigVariables(void)
|
|||
0,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
DefineCustomIntVariable(
|
||||
"citus.shard_count",
|
||||
gettext_noop("Sets the number of shards for a new hash-partitioned table"
|
||||
"created with create_distributed_table()."),
|
||||
NULL,
|
||||
&ShardCount,
|
||||
32, 1, 64000,
|
||||
PGC_USERSET,
|
||||
0,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
DefineCustomIntVariable(
|
||||
"citus.shard_replication_factor",
|
||||
gettext_noop("Sets the replication factor for shards."),
|
||||
|
|
|
@ -82,6 +82,7 @@ typedef enum
|
|||
|
||||
|
||||
/* Config variables managed via guc.c */
|
||||
extern int ShardCount;
|
||||
extern int ShardReplicationFactor;
|
||||
extern int ShardMaxSize;
|
||||
extern int ShardPlacementPolicy;
|
||||
|
|
Loading…
Reference in New Issue