static const unit_conversion memory_unit_conversion_table[] =
{
+ {"GB", GUC_UNIT_BYTE, 1024 * 1024 * 1024},
+ {"MB", GUC_UNIT_BYTE, 1024 * 1024},
+ {"kB", GUC_UNIT_BYTE, 1024},
+ {"B", GUC_UNIT_BYTE, 1},
+
{"TB", GUC_UNIT_KB, 1024 * 1024 * 1024},
{"GB", GUC_UNIT_KB, 1024 * 1024},
{"MB", GUC_UNIT_KB, 1024},
{"track_activity_query_size", PGC_POSTMASTER, RESOURCES_MEM,
gettext_noop("Sets the size reserved for pg_stat_activity.query, in bytes."),
NULL,
-
- /*
- * There is no _bytes_ unit, so the user can't supply units for
- * this.
- */
+ GUC_UNIT_BYTE
},
&pgstat_track_activity_query_size,
1024, 100, 102400,
{
switch (conf->flags & (GUC_UNIT_MEMORY | GUC_UNIT_TIME))
{
+ case GUC_UNIT_BYTE:
+ values[2] = "B";
+ break;
case GUC_UNIT_KB:
values[2] = "kB";
break;
#define GUC_UNIT_BLOCKS 0x2000 /* value is in blocks */
#define GUC_UNIT_XBLOCKS 0x3000 /* value is in xlog blocks */
#define GUC_UNIT_MB 0x4000 /* value is in megabytes */
+#define GUC_UNIT_BYTE 0x8000 /* value is in bytes */
#define GUC_UNIT_MEMORY 0xF000 /* mask for size-related units */
#define GUC_UNIT_MS 0x10000 /* value is in milliseconds */