Re: [ADMIN] Can postgres run autovacuum tasks when autovacuum is disabled?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [ADMIN] Can postgres run autovacuum tasks when autovacuum is disabled?
Date: 2014-07-30 12:38:07
Message-ID: 26640.1406723887@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-bugs

David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> Scott Marlowe-2 wrote
>> Are you sure these aren't to prevent wrap-around?

> This is my other theory, and probably the correct one. Is this something
> that can be discovered from the logs (since nothing in the query provides
> this detail)?

In all recent versions of Postgres, the pg_stat_activity line should
include "(to prevent wraparound)" if that's what autovac thinks it's
doing.

However ... it looks to me like if the autovac launcher gets launched
forcibly because of a possible wraparound issue, it will keep running
normally after that even if autovacuum is off :-(. You need to SIGHUP
it to get it to quit again. (A second bug is that it will then honor the
SIGHUP and quit, even if the wraparound emergency is still present.)

So I'm betting that what happened, particularly given the OP's apparent
insistence on managing vacuums manually, is that a wraparound vacuum
was forced on some relatively small table and then the launcher kept
doing its thing after that. Since log_autovacuum_min_duration was
set to 0, there should be some evidence for this theory in the logs
(although it looks like the log entries *don't* say whether the
vacuum was for wraparound :-().

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2014-07-30 15:09:37 Re: [ADMIN] Can postgres run autovacuum tasks when autovacuum is disabled?
Previous Message Rural Hunter 2014-07-30 10:03:30 Re: Very slow planning performance on partition table

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2014-07-30 14:58:03 Re: BUG #11090: Unclear error message in pg_upgrade
Previous Message David G Johnston 2014-07-30 08:00:45 Re: Can postgres run autovacuum tasks when autovacuum is disabled?