From: Laurenz Albe <laurenz.albe@cybertec.at>
To: jaya kumar <kumardba27@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Autovacuum------Doubts
Date: Mon, 08 Apr 2024 11:45:44 +0200
Message-ID: <70109b120e8f26fa29c1d0003a729639a5dec196.camel@cybertec.at> (raw)
In-Reply-To: <CACd4L3t3a7LHgJDysnKY6DQ1cBC6aeVhV=p3cVF3gOAtfUGvDA@mail.gmail.com>
References: <CACd4L3t3a7LHgJDysnKY6DQ1cBC6aeVhV=p3cVF3gOAtfUGvDA@mail.gmail.com>
On Mon, 2024-04-08 at 14:57 +0530, jaya kumar wrote:
> autovacuum_analyze_threshold and autovacuum_vacuum_threshold both parameter
> values set from 50 to 20.
>
> Created one table with 100 records. First, we deleted 21 records. after an
> autovacuum does not happen automatically. After again I deleted another 20.
> Out of 100 we delectated 40 records then the autovacuum happened automatically.
> As per the configuration Autocacuum will automatically delete 21 records
> in the table but my case does not happen.
>
> Can someone check and explain this.
The threshold is
autovacuum_vacuum_threshold + autovacuum_vacuum_scale_factor * number of table rows
So since you have set autovacuum_vacuum_scale_factor to 0.1 and there are 100 rows,
you need to delete 20 + 100 * 0.1 = 30 rows before autovacuum kicks in.
Yours,
Laurenz Albe
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-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, kumardba27@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Autovacuum------Doubts
In-Reply-To: <70109b120e8f26fa29c1d0003a729639a5dec196.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