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
From a94811e45df96846cb0531615e9d773f69d2cc2d Mon Sep 17 00:00:00 2001 From: Laurenz Albe <laurenz.a...@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