From a94811e45df96846cb0531615e9d773f69d2cc2d Mon Sep 17 00:00:00 2001
From: Laurenz Albe <laurenz.albe@cybertec.at>
Date: Fri, 4 Jun 2021 14:30:08 +0200
Subject: [PATCH] Document the 1GB memory limit for VACUUM

---
 doc/src/sgml/config.sgml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 7e32b0686c..0976494506 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -1882,6 +1882,12 @@ include_dir 'conf.d'
         too high.  It may be useful to control for this by separately
         setting <xref linkend="guc-autovacuum-work-mem"/>.
        </para>
+       <para>
+        Also, note that <command>VACUUM</command> has a hard-coded limit of 1GB
+        for the amount of memory used, so setting
+        <varname>maintenance_work_mem</varname> higher than that has no effect
+        as far as <command>VACUUM</command> is concerned.
+       </para>
       </listitem>
      </varlistentry>
 
@@ -1901,6 +1907,11 @@ include_dir 'conf.d'
         be used instead.  The setting has no effect on the behavior of
         <command>VACUUM</command> when run in other contexts.
        </para>
+       <para>
+        Note that <command>VACUUM</command> has a hard-coded limit of 1GB
+        for the amount of memory used, so setting
+        <varname>autovacuum_work_mem</varname> higher than that has no effect.
+       </para>
       </listitem>
      </varlistentry>
 
-- 
2.26.3

