Search Postgresql Archives

Re: pg_cancel_backend() does not work with buzz queries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

2. The client just waits for query and buzz.
3. They are using CPU in usual way and their pg_lock activity seems normal.

So the backend that appears "stuck" is still using CPU?

4. No I haven't noticed anything odd.

So - the symptoms are:
1. Client hangs, waiting for the result of a query
2. You notice this
3. You issue pg_cancel_backend() which sends a SIGINT which doesn't do anything 4. You have to cancel the query from the command-line using "kill -9 <backend-pid>"


Are you happy that your hardware and drivers are OK? There aren't problems with any other servers on this machine?

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux