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.
Yours,
Laurenz Albe