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."),


Reply via email to