public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: Masahiko Sawada <[email protected]>
Cc: Martín Marqués <[email protected]>
Cc: [email protected]
Subject: Re: Update maintenance_work_mem/autovacuum_work_mem to reflect the 1GB limitation with VACUUM
Date: Fri, 04 Jun 2021 14:34:42 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAD21AoAv5gdFEggmHj-GeSVvkZkhv1fvLf3xe8aPUS7y8tOTNg@mail.gmail.com>
References: <CABeG9LsZ2ozUMcqtqWu_-GiFKB17ih3p8wBHXcpfnHqhCnsc7A@mail.gmail.com>
	<[email protected]>
	<CAD21AoAv5gdFEggmHj-GeSVvkZkhv1fvLf3xe8aPUS7y8tOTNg@mail.gmail.com>

On Wed, 2021-06-02 at 18:16 +0900, Masahiko Sawada wrote:
> > > We should add a line that indicates that there is a limitation (that
> > > should be IMO, backported to documentation of earlier versions as it
> > > affects all supported versions), at least until such limitation is
> > > lifted.
> > Here is a patch for that,
> 
> The patch adds the description in the autovacuum_work_mem section.
> Isn't it better to add it in mantenance_work section or VACUUM command
> section since this limitation is not only for autovacuum?

You are right; theoretically, the correct place to document that
would be the VACUUM documentation.  But I guess that most people who
are curious about VACUUM's memory usage will read the documentation for
"maintenance_work_mem" or "autovacuum_work_mem".

I have fixed a typo and added a similar paragraph to "maintenance_work_mem".

Yours,
Laurenz Albe


Attachments:

  [text/x-patch] 0001-Document-the-1GB-memory-limit-for-VACUUM.v2.patch (1.4K, 2-0001-Document-the-1GB-memory-limit-for-VACUUM.v2.patch)
  download | inline diff:
From a94811e45df96846cb0531615e9d773f69d2cc2d Mon Sep 17 00:00:00 2001
From: Laurenz Albe <[email protected]>
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



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Update maintenance_work_mem/autovacuum_work_mem to reflect the 1GB limitation with VACUUM
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox