Re: admin control over cancelling autovacuum when blocked by a lock - Mailing list pgsql-admin

From Tom Lane
Subject Re: admin control over cancelling autovacuum when blocked by a lock
Date
Msg-id 19579.1556588264@sss.pgh.pa.us
Whole thread Raw
In response to Re: admin control over cancelling autovacuum when blocked by a lock  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-admin
Simon Riggs <simon@2ndquadrant.com> writes:
> On Mon, 29 Apr 2019 at 22:02, John Lumby <johnlumby@hotmail.com> wrote:
>> If a regular backend worker becomes blocked waiting for a lock held by an
>> autovacuum worker,
>> then ,  depending on some decision made by deadlock detector,
>> the autovacuum worker may be signalled to terminate
>> Is there any configuration parameter which controls this?
>> including deferring or even completely eliminating this cancelling?

> Why would you want this?
> If the autovacuum is cancelled, it will re-execute again in the near
> future, once your interrupting SQL has released locks.

I think the OP is looking for the opposite, ie prevent autovacuum from
being kicked off the lock.  It already is resistant to that if we're
doing an anti-wraparound vacuum, so maybe the simplest answer is to
tighten up autovacuum_freeze_max_age.  (Whether that's a good idea
is a different question.)  Or you could just launch a manual vacuum.

            regards, tom lane



pgsql-admin by date:

Previous
From: John Lumby
Date:
Subject: Re: admin control over cancelling autovacuum when blocked by a lock
Next
From: Tom Lane
Date:
Subject: Re: admin control over cancelling autovacuum when blocked by a lock