@@ -722,6 +722,11 @@ static const char *memory_units_hint = gettext_noop("Valid units for this parame
722
722
723
723
static const unit_conversion memory_unit_conversion_table [] =
724
724
{
725
+ {"GB" , GUC_UNIT_BYTE , 1024 * 1024 * 1024 },
726
+ {"MB" , GUC_UNIT_BYTE , 1024 * 1024 },
727
+ {"kB" , GUC_UNIT_BYTE , 1024 },
728
+ {"B" , GUC_UNIT_BYTE , 1 },
729
+
725
730
{"TB" , GUC_UNIT_KB , 1024 * 1024 * 1024 },
726
731
{"GB" , GUC_UNIT_KB , 1024 * 1024 },
727
732
{"MB" , GUC_UNIT_KB , 1024 },
@@ -2863,11 +2868,7 @@ static struct config_int ConfigureNamesInt[] =
2863
2868
{"track_activity_query_size" , PGC_POSTMASTER , RESOURCES_MEM ,
2864
2869
gettext_noop ("Sets the size reserved for pg_stat_activity.query, in bytes." ),
2865
2870
NULL ,
2866
-
2867
- /*
2868
- * There is no _bytes_ unit, so the user can't supply units for
2869
- * this.
2870
- */
2871
+ GUC_UNIT_BYTE
2871
2872
},
2872
2873
& pgstat_track_activity_query_size ,
2873
2874
1024 , 100 , 102400 ,
@@ -8113,6 +8114,9 @@ GetConfigOptionByNum(int varnum, const char **values, bool *noshow)
8113
8114
{
8114
8115
switch (conf -> flags & (GUC_UNIT_MEMORY | GUC_UNIT_TIME ))
8115
8116
{
8117
+ case GUC_UNIT_BYTE :
8118
+ values [2 ] = "B" ;
8119
+ break ;
8116
8120
case GUC_UNIT_KB :
8117
8121
values [2 ] = "kB" ;
8118
8122
break ;
0 commit comments