Re: Autovacuum cancellation - Mailing list pgsql-patches

From Tom Lane
Subject Re: Autovacuum cancellation
Date
Msg-id 10572.1193403397@sss.pgh.pa.us
Whole thread Raw
In response to Re: Autovacuum cancellation  (Heikki Linnakangas <heikki@enterprisedb.com>)
List pgsql-patches
Heikki Linnakangas <heikki@enterprisedb.com> writes:
> Alvaro Herrera wrote:
>> /*
>> * Look for a blocking autovacuum. There will only ever
>> * be one, since the autovacuum workers are careful
>> * not to operate concurrently on the same table.
>> */

> I think that's a bit unaccurate. You could have multiple autovacuum
> workers operating on different tables participating in a deadlock. The
> reason that can't happen is that autovacuum never holds a lock while
> waiting for another.

And that's not true either.  It may only want low-grade locks (eg
AccessShareLock on a system catalog) but deadlock is nonetheless
entirely possible in principle.

            regards, tom lane

pgsql-patches by date:

Previous
From: Zdenek Kotala
Date:
Subject: fix ZIC dependency on postgres.h
Next
From: Tom Lane
Date:
Subject: Re: Autovacuum cancellation