Re: show "aggressive" or not in autovacuum logs

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: show "aggressive" or not in autovacuum logs
Date: 2017-08-29 03:07:32
Message-ID: CAKFQuwY4GBEzjwJwQRUDRD-1ZvUFXPTQOiiH4UrP1jn1sMGp1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 28, 2017 at 2:26 AM, Kyotaro HORIGUCHI <
horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:

> https://www.postgresql.org/docs/devel/static/runtime-config-client.html
>
> >
> ​V​
> ACUUM performs an aggressive scan
>

​Maybe this should gets its own thread/patch but I'll tack this on here
since it all seems related.

​That paragraph you linked has a couple of typos:

"Although users can set this value anywhere from zero to two billions,
VACUUM" ...

should be 'two billion' (i.e., drop the "s")

"...so that a periodical manual VACUUM has..."

'periodic' - though the description in the linked 24.1.5 is somewhat
clearer (and longer) - the gap exists for the benefit of routine vacuum
invocations to detect the need for an aggressive vacuum as part of a normal
operating cycle rather than the last routine vacuum being non-aggressive
and shortly thereafter an auto-vacuum anti-wraparound run is performed.

Current:

VACUUM will silently limit the effective value to 95% of
autovacuum_freeze_max_age, so that a periodical manual VACUUM has a chance
to run before an anti-wraparound autovacuum is launched for the table.

My interpretation:

VACUUM will silently limit the effective value to 95% of
autovacuum_freeze_max_age so that a normal scan has a window within which
to detect the need to convert itself to an aggressive scan and preempt the
need for an untimely autovacuum initiated anti-wraparound scan.

As noted in the 24.1.5 that "normal scan" can be time scheduled or an
update driven auto-vacuum one. It could be manual (though not really
periodic) if one is monitoring the aging and is notified to run on manually
when the age falls within the gap.

"Aggressive" sounds right throughout all of this.

Up-thread:
INFO: vacuuming "public.it" in aggressive mode

Maybe:
INFO: aggressively vacuuming "public.it"
INFO: vacuuming "public.it"

Likewise:
LOG: automatic vacuum of table "postgres.public.pgbench_branches": mode:
aggressive, index scans: 0

could be:
LOG: automatic aggressive vacuum of table
"postgres.public.pgbench_branches", index scans: 0

Having read the docs and come to understand what "aggressive" means two
wordings work for me (i.e., leaving non-aggressive unadorned).

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mithun Cy 2017-08-29 03:14:28 Re: NoMovementScanDirection in heapgettup() and heapgettup_pagemode()
Previous Message Robert Haas 2017-08-29 03:02:35 Re: [HACKERS] [postgresql 10 beta3] unrecognized node type: 90