Skip site navigation (1) Skip section navigation (2)

Re: Autovacuum cancellation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(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 00:38:42
Message-ID: 29572.1193359122@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackerspgsql-patches
Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> Can autovacuum actually get into a hard deadlock?

It can certainly be part of a deadlock loop, though the practical cases
might be few.  It will be holding more than one lock, eg a lock on its
target table and various transient locks on system catalogs, and other
processes taking or trying for exclusive locks on those things could
create issues.  I think it's OK to leave the issue go for now, until
we see if anyone hits it in practice --- I just wanted to mention that
we might need to consider the problem in future.

> 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.

I think you don't understand what that code is doing.  If there's an
autovac anywhere in the dependency graph, it'll find it.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Henry B. HotzDate: 2007-10-26 00:39:37
Subject: Re: 8.3 GSS Issues
Previous:From: Alvaro HerreraDate: 2007-10-25 22:51:56
Subject: Re: suitable text search configuration

pgsql-committers by date

Next:From: Alvaro HerreraDate: 2007-10-26 01:11:02
Subject: Re: Autovacuum cancellation
Previous:From: Gregory StarkDate: 2007-10-25 22:28:39
Subject: Re: Autovacuum cancellation

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2007-10-26 01:11:02
Subject: Re: Autovacuum cancellation
Previous:From: Joe ConwayDate: 2007-10-25 22:36:24
Subject: Re: [GENERAL] Crosstab Problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group