Re: BUG #3790: pg_restore error canceling statement due to user request

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Gregory Stark <stark(at)enterprisedb(dot)com>, "Mike C(dot)" <smith(dot)not(dot)western(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3790: pg_restore error canceling statement due to user request
Date: 2007-12-04 20:54:52
Message-ID: 200712042054.lB4Ksrf10509@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera wrote:
> Bruce Momjian escribi??:
> > Magnus Hagander wrote:
> > > On Fri, Nov 30, 2007 at 10:13:53AM +0000, Gregory Stark wrote:
> > > >
> > > > "Mike C." <smith(dot)not(dot)western(at)gmail(dot)com> writes:
> > > >
> > > > > I don't know if this is either a wording change, or a more serious bug, but
> > > > > when I do a pg_restore (from a 8.1.9 setup) to a fresh 8.3beta3 created
> > > > > database (createdb command only), I repeatedly see:
> > > > >
> > > > > ERROR: canceling statement due to user request
> > > > > CONTEXT: automatic analyze of table "dbs.public.entity_event"
> > > >
> > > > This is intentional, though perhaps the wording is confusing. What impression
> > > > does the wording give you? Does it make you think something has gone wrong?
> > >
> > > The fact that it says ERROR kind of hints that something has gone wrong,
> > > no? (so yes, I agree the wording isn't very good)
> >
> > What is causing this? Statement_timeout? I see different wording for
> > that behavior. Is the postmaster getting a signal from somewhere on the
> > system?
>
> It's the new autovacuum cancel stuff.

Ah, OK. Right now we have these two cancel messages:

if (cancel_from_timeout)
ereport(ERROR,
(errcode(ERRCODE_QUERY_CANCELED),
errmsg("canceling statement due to statement timeout")));
else
ereport(ERROR,
(errcode(ERRCODE_QUERY_CANCELED),
errmsg("canceling statement due to user request")));

While the first one is fine, the second one is used for Control-C and
the new autovacuum code to exit an activity when it is blocking someone
from getting a table lock. Perhaps we just need to change the wording
to "canceling statement" and not specify the cause.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2007-12-04 21:35:22 Re: BUG #3790: pg_restore error canceling statement due to user request
Previous Message Alvaro Herrera 2007-12-04 17:05:42 Re: BUG #3790: pg_restore error canceling statement due touser request