Re: canceling autovacuum task woes - Mailing list pgsql-hackers

From Robert Haas
Subject Re: canceling autovacuum task woes
Date
Msg-id CA+TgmobbhBijbimzk=tt+G+tz2VXyUYxVdrZ21A-k-eOXscWhQ@mail.gmail.com
Whole thread Raw
In response to Re: canceling autovacuum task woes  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: canceling autovacuum task woes  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: canceling autovacuum task woes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Jul 24, 2012 at 3:35 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Yep, it says:
>
> ERROR:  canceling autovacuum task
> CONTEXT:  automatic vacuum of table "alvherre.public.foo"
>
> So at least that part seems pilot error more than anything else.

Yeah, you're right.  So you do get the table name.  But you don't get
the cause, which is what you really need to understand why it's
happening.  Attached is a patch that adds some more detail.  Here's an
example of what the output looks like:

LOG:  sending cancel to blocking autovacuum PID 21595
DETAIL:  Process 21618 waits for AccessExclusiveLock on relation 27863
of database 16384
STATEMENT:  drop table if exists pgbench_accounts
ERROR:  canceling autovacuum task
CONTEXT:  automatic vacuum of table "rhaas.public.pgbench_accounts"

I think that's a lot more useful than just getting those last two lines...

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [patch] libpq one-row-at-a-time API
Next
From: Alvaro Herrera
Date:
Subject: Re: canceling autovacuum task woes