Skip site navigation (1) Skip section navigation (2)

pg_cancel_backend() не снимает зависшие транзакции

From: "Sergey Konoplev" <gray(dot)ru(at)gmail(dot)com>
To: pgsql-ru-general(at)postgresql(dot)org
Subject: pg_cancel_backend() не снимает зависшие транзакции
Date: 2007-10-03 08:35:57
Message-ID: c3a7de1f0710030135p4b93f3e7iff901da1445f4b13@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-ru-general
Привет всем,

Уже просто опускаются руки, довольно часто зависают запросы, причём
pg_cancel_backend() их не может снять. Помогает только перезагрузка
postgres с HUPом. Перерыл весь интернет, ничего не нашел. Последняя
надежда на комьюнити... Пример ситуации и кое-какая инфа ниже.

Заранее спасибо за помощь.

transport=# select version();
                                       version
-------------------------------------------------------------------------------------
 PostgreSQL 8.2.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)
3.3.3 (SuSE Linux)
(1 row)

transport=# select datname, usename, procpid, current_query::char(15),
waiting, query_start from pg_catalog.pg_stat_activity where procpid =
20530;
  datname  |     usename      | procpid |  current_query  | waiting |
        query_start
-----------+------------------+---------+-----------------+---------+-------------------------------
 transport | belostotskaya_la |   20530 | select * from c | f       |
2007-10-02 05:05:28.908687+04
(1 row)

transport=# select pg_catalog.pg_cancel_backend(20530);
 pg_cancel_backend
-------------------
 t
(1 row)

transport=# select datname, usename, procpid, current_query::char(15),
waiting, query_start from pg_catalog.pg_stat_activity where procpid =
20530;
  datname  |     usename      | procpid |  current_query  | waiting |
        query_start
-----------+------------------+---------+-----------------+---------+-------------------------------
 transport | belostotskaya_la |   20530 | select * from c | f       |
2007-10-02 05:05:28.908687+04
(1 row)

-- 
Regards,
Sergey Konoplev

Responses

pgsql-ru-general by date

Next:From: Sergey KonoplevDate: 2007-10-03 08:44:16
Subject: Re: pg_cancel_backend() does not work with buzz queries
Previous:From: Sergey KonoplevDate: 2007-10-03 08:11:32
Subject: pg_cancel_backend() does not work with buzz queries

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group