From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Darafei Komяpa Praliaskouski <me(at)komzpa(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Michael Banck <mbanck(at)gmx(dot)net> |
Subject: | Re: Berserk Autovacuum (let's save next Mandrill) |
Date: | 2020-03-25 15:06:56 |
Message-ID: | 20200325150656.GX21443@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Mar 23, 2020 at 02:27:29PM +0100, Laurenz Albe wrote:
> Here is version 10 of the patch, which uses a scale factor of 0.2.
Thanks
> Any table that has received more inserts since it was
> last vacuumed (and that is not vacuumed for another
> reason) will be autovacuumed.
Since this vacuum doesn't trigger any special behavior (freeze), you can remove
the parenthesized part: "(and that is not vacuumed for another reason)".
Maybe in the docs you can write this with thousands separators: 10,000,000
It looks like the GUC uses scale factor max=1e10, but the relopt is still
max=100, which means it's less possible to disable for a single rel.
> +++ b/src/backend/access/common/reloptions.c
> @@ -398,6 +407,15 @@ static relopt_real realRelOpts[] =
> },
> -1, 0.0, 100.0
> },
> + {
> + {
> + "autovacuum_vacuum_insert_scale_factor",
> + "Number of tuple inserts prior to vacuum as a fraction of reltuples",
> + RELOPT_KIND_HEAP | RELOPT_KIND_TOAST,
> + ShareUpdateExclusiveLock
> + },
> + -1, 0.0, 100.0
> + },
> {
> {
> "autovacuum_analyze_scale_factor",
> +++ b/src/backend/utils/misc/guc.c
> @@ -3549,6 +3558,17 @@ static struct config_real ConfigureNamesReal[] =
> 0.2, 0.0, 100.0,
> NULL, NULL, NULL
> },
> +
> + {
> + {"autovacuum_vacuum_insert_scale_factor", PGC_SIGHUP, AUTOVACUUM,
> + gettext_noop("Number of tuple inserts prior to vacuum as a fraction of reltuples."),
> + NULL
> + },
> + &autovacuum_vac_ins_scale,
> + 0.2, 0.0, 1e10,
> + NULL, NULL, NULL
> + },
> +
> {
> {"autovacuum_analyze_scale_factor", PGC_SIGHUP, AUTOVACUUM,
> gettext_noop("Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples."),
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Fan | 2020-03-25 15:20:30 | Re: [PATCH] Erase the distinctClause if the result is unique by definition |
Previous Message | David Steele | 2020-03-25 14:52:42 | Re: [Patch] Invalid permission check in pg_stats for functional indexes |