Skip to content

Commit 0b8e181

Browse files
authored
Pretty print kilobytes using kB instead of KB (#732)
Apparently postgres requires a lowercase `k`. I got this error: ``` 13:45:13 26 ERROR 2021-06-17 13:45:03.277 GMT [32] LOG: invalid value for parameter "effective_cache_size": "5993 KB" 13:45:13 27 ERROR Failed to install pg_auto_failover in the monitor's Postgres database, see above for details 13:45:13 26 ERROR 2021-06-17 13:45:03.277 GMT [32] HINT: Valid units for this parameter are "kB", "MB", "GB", and "TB". 13:45:13 26 ERROR 2021-06-17 13:45:03.277 UTC [32] FATAL: configuration file "/tmp/monitor/postgresql-auto-failover.conf" contains errors ```
1 parent 8fd63f3 commit 0b8e181

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/bin/pg_autoctl/system_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ pretty_print_bytes(char *buffer, size_t size, uint64_t bytes)
114114
{
115115
const char *suffixes[7] = {
116116
"B", /* Bytes */
117-
"KB", /* Kilo */
117+
"kB", /* Kilo */
118118
"MB", /* Mega */
119119
"GB", /* Giga */
120120
"TB", /* Tera */

0 commit comments

Comments
 (0)