From: Laurenz Albe <laurenz.albe@cybertec.at>
To: nikolai.berkoff <nikolai.berkoff@pm.me>
To: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
Subject: Re: Missing mention of autovacuum_work_mem
Date: Mon, 20 Sep 2021 15:09:36 +0200
Message-ID: <b48ec99bfbb9eaf329fd9c3e7a20551810244882.camel@cybertec.at> (raw)
In-Reply-To: <1kIqf6Q1G-wVkQkeg_BRSpcmy77hNfh9vlLQ3AF1APT-pKHRYT3z1IuDC5K2w83-4Qa016V1SfWJfF1v0Z0qf6141DbLcpIZJY3edlBEkCs=@pm.me>
References: <1kIqf6Q1G-wVkQkeg_BRSpcmy77hNfh9vlLQ3AF1APT-pKHRYT3z1IuDC5K2w83-4Qa016V1SfWJfF1v0Z0qf6141DbLcpIZJY3edlBEkCs=@pm.me>
On Mon, 2021-09-20 at 08:07 +0000, nikolai.berkoff wrote:
> I can see in
> src/backend/access/heap/vacuumlazy.c
> that compute_max_dead_tuples uses autovacuum_work_mem when it is given.
>
> The "vacuuming indexes" documentation has:
>
> > "If a table has any indexes, this will happen at least once per vacuum,
> > after the heap has been completely scanned. It may happen multiple times per
> > vacuum if maintenance_work_mem is insufficient to store the number of dead
> > tuples found."
Your suggested change is:
> "If a table has any indexes, this will happen at least once per vacuum,
> after the heap has been completely scanned. It may happen multiple times per
> vacuum if the memory is insufficient to store the number of dead
> tuples found. The memory is set via the maintenance_work_mem unless
> it is an autovacuum then autovacuum_work_mem will be used."
Why not keep it simple with
"If a table has any indexes, this will happen at least once per vacuum,
after the heap has been completely scanned. It may happen multiple times per
vacuum if maintenance_work_mem (or, in the case of autovacuum,
autovacuum_work_mem) is insufficient to store the number of dead
tuples found."
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
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: pgsql-docs@postgresql.org
Cc: laurenz.albe@cybertec.at, nikolai.berkoff@pm.me, pgsql-docs@lists.postgresql.org
Subject: Re: Missing mention of autovacuum_work_mem
In-Reply-To: <b48ec99bfbb9eaf329fd9c3e7a20551810244882.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox