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

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

From: "Sergey Konoplev" <gray(dot)ru(at)gmail(dot)com>
To: pgsql-ru-general(at)postgresql(dot)org
Subject: Re: pg_cancel_backend() не снимает зависшие транзакции
Date: 2007-10-03 08:44:56
Message-ID: c3a7de1f0710030144t5b2bc65fic26894e91740b3af@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-ru-general
Извините, я имел ввиду не HUP, а KILL

2007/10/3, Sergey Konoplev <gray(dot)ru(at)gmail(dot)com>:
> Привет всем,
>
> Уже просто опускаются руки, довольно часто зависают запросы, причём
> 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
>


-- 
Regards,
Sergey Konoplev

In response to

pgsql-ru-general by date

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

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