Re: Update maintenance_work_mem/autovacuum_work_mem to reflect the 1GB limitation with VACUUM

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Martín Marqués <martin(dot)marques(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Update maintenance_work_mem/autovacuum_work_mem to reflect the 1GB limitation with VACUUM
Date: 2021-07-02 11:31:07
Message-ID: CAApHDvrSDxi2jvStdi4vnrD3JjMffSkEZhK8C3-NsLV+CFhL8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

On Fri, 21 May 2021 at 03:52, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
> Just sending a reply to -hackers so I can add it to the commitfest.

I had a look at the patch in [1] and I find it a bit weird that we'd
write the following about autovacuum_work_mem in our docs:

+ <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>

Since that setting is *only* used for auto vacuum, why don't we just
limit the range of the GUC to 1GB?

Of course, it wouldn't be wise to backpatch the reduced limit of
autovacuum_work_mem as it might upset people who have higher values in
their postgresql.conf when their database fails to restart after an
upgrade. I think what might be best is just to reduce the limit in
master and apply the doc patch for just maintenance_work_mem in all
supported versions. We could just ignore doing anything with
autovacuum_work_mem in the back branches and put it down to a
historical mistake that can't easily be fixed now.

I've attached what I came up with.

What do you think?

[1] https://www.postgresql.org/message-id/514fe5ce4714b7b33cb0a611f0c7b72df413bef5.camel%40cybertec.at

Attachment Content-Type Size
limit_vacuum_memory_to_1gb.patch application/octet-stream 1.1 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Laurenz Albe 2021-07-02 12:40:52 Re: Update maintenance_work_mem/autovacuum_work_mem to reflect the 1GB limitation with VACUUM
Previous Message Daniel Westermann (DWE) 2021-07-02 05:15:23 Re: Link missing in the 14 release notes

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2021-07-02 11:56:06 Re: Numeric multiplication overflow errors
Previous Message Pavel Stehule 2021-07-02 11:29:27 Re: Schema variables - new implementation for Postgres 15