Re: Autovacuum cancellation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Autovacuum cancellation
Date: 2007-10-26 12:56:37
Message-ID: 10572.1193403397@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers pgsql-patches

Heikki Linnakangas <heikki(at)enterprisedb(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2007-10-26 12:59:47 Re: Autovacuum cancellation
Previous Message User Mkz 2007-10-26 11:35:28 pgbouncer - pgbouncer: version 1.1.1

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-10-26 12:59:47 Re: Autovacuum cancellation
Previous Message Gokulakannan Somasundaram 2007-10-26 12:38:19 Re: [PATCHES] Including Snapshot Info with Indexes

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-10-26 12:59:47 Re: Autovacuum cancellation
Previous Message Gokulakannan Somasundaram 2007-10-26 12:38:19 Re: [PATCHES] Including Snapshot Info with Indexes