pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: John Lumby <johnlumby@hotmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: admin control over cancelling autovacuum when blocked by a lock
Date: Mon, 29 Apr 2019 21:37:44 -0400
Message-ID: <19579.1556588264@sss.pgh.pa.us> (raw)
In-Reply-To: <CANP8+jJSysBHF_QRdYmT-iKQDy4yw8OaqgiLoNJPdjTX1bJB8w@mail.gmail.com>
References: <DM6PR06MB556272F9CB7629B10CE86829A3390@DM6PR06MB5562.namprd06.prod.outlook.com>
	<CANP8+jJSysBHF_QRdYmT-iKQDy4yw8OaqgiLoNJPdjTX1bJB8w@mail.gmail.com>

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





view thread (15+ messages)  latest in thread

Message-ID: <19579.1556588264@sss.pgh.pa.us>
Permalink:  ../19579.1556588264@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19579.1556588264@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, simon@2ndquadrant.com, johnlumby@hotmail.com
  Subject: Re: admin control over cancelling autovacuum when blocked by a lock
  In-Reply-To: <19579.1556588264@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox