Re: pg_cancel_backend() does not work with buzz queries

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_cancel_backend() does not work with buzz queries
Date: 2007-10-03 10:57:23
Message-ID: 20071003105723.GD22596@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-ru-general

On Wed, Oct 03, 2007 at 11:18:32AM +0100, Richard Huxton wrote:
> Don't forget to cc: the list.
> Try not to top-post replies, it's easier to read if you reply below the
> text you're replying to.
>
> Sergey Konoplev wrote:
> >>1. Is it always the same query?
> >>2. Does the client still think it's connected?
> >>3. Is that query using up CPU, or just idling?
> >>4. Anything odd in pg_locks for the problem pid?
>
> >1. No it isn't. I have few functions (plpgsql, plpython) that cause
> >such situations more often than another but they are called more often
> >also.
>
> OK, so there's no real pattern. That would suggest it's not a particular
> query-plan that's got something wrong.
>
> Do you always get this problem inside a function?

Does pl/python listen to SIGINT during execution of functions? If not,
that'd be an explanation - if it's stuck inside a pl/python function...

AFAIK, pl/pgsql does listen for SIGINT during execution, but I don't nkow
abuot plpython.

> 4. You have to cancel the query from the command-line using "kill -9
> <backend-pid>"

That's not cancel, that's taking a sledgehammer to your server :(

//Magnus

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Tolley 2007-10-03 11:12:37 Re: Feature Request - Defining default table space for Indexes in Conf file
Previous Message Diego Gil 2007-10-03 10:26:17 Re: datestyle question

Browse pgsql-ru-general by date

  From Date Subject
Next Message Sergey Konoplev 2007-10-03 11:34:06 Re: [GENERAL] pg_cancel_backend() does not work with buzz queries
Previous Message Sergey Konoplev 2007-10-03 10:51:14 Fwd: pg_cancel_backend() не снимает зависшие транзакции