diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index d613846310b8b1f7cdc2294f10d1afd7eb565db8..3ee64d43d83f6011552ec1421c7361bb2d1688e7 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -1991,7 +1991,7 @@ static struct config_int ConfigureNamesInt[] =
 			GUC_UNIT_XBLOCKS
 		},
 		&XLOGbuffers,
-		-1, -1, INT_MAX,
+		-1, -1, (INT_MAX / XLOG_BLCKSZ),
 		check_wal_buffers, NULL, NULL
 	},