diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 6098f6b020..a7281c8e73 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1893,6 +1893,11 @@ include_dir 'conf.d'
too high. It may be useful to control for this by separately
setting .
+
+ Additionally, VACUUM is only able to utilize up to
+ a maximum of 1GB of memory, so maintenance_work_mem
+ values higher than this have no effect on VACUUM.
+
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 480e8cd199..bb76baa72d 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -3340,7 +3340,8 @@ static struct config_int ConfigureNamesInt[] =
GUC_UNIT_KB
},
&autovacuum_work_mem,
- -1, -1, MAX_KILOBYTES,
+ /* see compute_max_dead_tuples if you need to change the max value */
+ -1, -1, 1024 * 1024,
check_autovacuum_work_mem, NULL, NULL
},