Re: Managing autovacuum freezing

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Don Seiler <don(at)seiler(dot)us>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Managing autovacuum freezing
Date: 2021-02-11 19:32:39
Message-ID: CAH2-WzmD28vA7DYNV1TipsBLgb0Q7w8vJPEx6G83UdyXm5vA0Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Feb 11, 2021 at 11:23 AM Don Seiler <don(at)seiler(dot)us> wrote:
> Right. I was thinking we'd still do the nightly manual vacuum, adding in the INDEX_CLEANUP option after disabling the attribute at the table level. But was wondering if we should still consider enabling autovacuum on that table to hopefully lessen the work needed by the wraparound-prevention aggressive autovac.

Regular autovacuum (any VACUUM) will freeze tuples, so that certainly
makes sense to me. Sometimes it can seem like it's skipping the work
done in an anti-wraparound vacuum entirely because only the latter
insists on doing cleanup of every heap page, if necessary by waiting
to get a buffer pin -- and that could be harder during a busy period.
And also because the visibility bits in the VM can allow regular
vacuum to skip a lot more work than anti-wraparound vacuum, which can
only skip pages with the freeze bit set.

An anti-wraparound vacuum is actually less different to a regular
autovacuum than most users intuit. Though I get it why it seems that
way -- the practical difference can be really noticeable in
production, even though the theoretical differences seem rather small
to me.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Peter Eisentraut 2021-02-11 19:44:35 Re: pglogical with bytea values
Previous Message Don Seiler 2021-02-11 19:23:41 Re: Managing autovacuum freezing