Re: Berserk Autovacuum (let's save next Mandrill)

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Darafei Komяpa Praliaskouski <me(at)komzpa(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Michael Banck <mbanck(at)gmx(dot)net>, dgrowleyml(at)gmail(dot)com
Subject: Re: Berserk Autovacuum (let's save next Mandrill)
Date: 2020-03-04 15:15:47
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, 2020-03-03 at 16:28 +0100, Laurenz Albe wrote:
> As a more substantial base for discussion, here is a patch that:
> - introduces a GUC and reloption "autovacuum_vacuum_insert_limit",
> default 10000000
> - introduces a statistics counter "inserts_since_vacuum" per table
> that gets reset to 0 after vacuum
> - causes autovacuum to run without cleaning up indexes if
> inserts_since_vacuum > autovacuum_vacuum_insert_limit
> and there is no other reason for an autovacuum

I just realized that the exercise is pointless unless that
autovacuum also runs with FREEZE on.

Updated patch attached.

Laurenz Albe

Attachment Content-Type Size
0001-Autovacuum-tables-that-have-received-only-inserts.v2.patch text/x-patch 12.9 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-03-04 15:35:16 Re: Symbolic names for the values of typalign and typstorage
Previous Message Georgios Kokolatos 2020-03-04 15:02:58 Re: ALTER TEXT SEARCH DICTIONARY tab completion