Re: auto-vacuum conflicting with long running analyze

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Cc: "Shane Ambler" <pgsql(at)Sheeky(dot)Biz>, "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: auto-vacuum conflicting with long running analyze
Date: 2008-04-05 19:06:31
Message-ID: 874pagcea0.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Alvaro Herrera" <alvherre(at)commandprompt(dot)com> writes:

> Shane Ambler wrote:
>
>> Given that the analyze will obviously take a long time, is this scenario
>> likely to happen with 8.3.1? or has it been fixed since 8.1.x?
>
> In 8.3, autovacuum cancels itself if it sees it is conflicting with
> another query.

But that's because it could *block* other queries. Not because it should be
causing deadlocks. Unless you're doing analyze within a transaction I don't
see why a autovacuum would be causing deadlocks. There are useful reasons to
run analyze within a transaction but I suspect you're not actually doing it
for any of those reasons.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-04-05 20:49:19 Re: [HACKERS] Patch queue -> wiki
Previous Message Shane Ambler 2008-04-05 18:37:15 Re: auto-vacuum conflicting with long running analyze