Re: Autovacuum cancellation - Mailing list pgsql-patches

From Gregory Stark
Subject Re: Autovacuum cancellation
Date
Msg-id 87abq696co.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Autovacuum cancellation  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Autovacuum cancellation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> There's some things still to be desired here: if an autovac process is
> involved in a hard deadlock, the patch doesn't favor zapping it over
> anybody else, nor consider cancelling the autovac as an alternative to
> rearranging queues for a soft deadlock.  But dealing with that will open
> cans of worms that I don't think we want to open for 8.3.

Can autovacuum actually get into a hard deadlock? Does it take more than one
lock that can block others at the same time?

I think there's a window where the process waiting directly on autovacuum
could have already fired its deadlock check before it was waiting directly on
autovacuum. But the only way I can see it happening is if another process is
cancelled before its deadlock check fires and the signals are processed out of
order. I'm not sure that's a case we really need to worry about.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Autovacuum cancellation
Next
From: Joe Conway
Date:
Subject: Re: [GENERAL] Crosstab Problems