From ee93f34e420ed84deb3ee94925067ab4f91835a3 Mon Sep 17 00:00:00 2001 From: Junwang Zhao Date: Wed, 19 Apr 2023 11:15:22 +0800 Subject: [PATCH v1] use INT_MAX for wal size related max value For these WAL size related gucs, the config_generic part set the GUC_UNIT_MB flag, so use INT_MAX instead of MAX_KILOBYTES for their max value. Signed-off-by: Junwang Zhao --- src/backend/utils/misc/guc_tables.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index cab3ddbe11..f6b8ca3266 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -2695,7 +2695,7 @@ struct config_int ConfigureNamesInt[] = GUC_UNIT_MB }, &wal_keep_size_mb, - 0, 0, MAX_KILOBYTES, + 0, 0, INT_MAX, NULL, NULL, NULL }, @@ -2707,7 +2707,7 @@ struct config_int ConfigureNamesInt[] = }, &min_wal_size_mb, DEFAULT_MIN_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024)), - 2, MAX_KILOBYTES, + 2, INT_MAX, NULL, NULL, NULL }, @@ -2719,7 +2719,7 @@ struct config_int ConfigureNamesInt[] = }, &max_wal_size_mb, DEFAULT_MAX_WAL_SEGS * (DEFAULT_XLOG_SEG_SIZE / (1024 * 1024)), - 2, MAX_KILOBYTES, + 2, INT_MAX, NULL, assign_max_wal_size, NULL }, @@ -2834,7 +2834,7 @@ struct config_int ConfigureNamesInt[] = GUC_UNIT_MB }, &max_slot_wal_keep_size_mb, - -1, -1, MAX_KILOBYTES, + -1, -1, INT_MAX, NULL, NULL, NULL }, -- 2.33.0