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]

 



I'm sorry I mean not HUP but KILL

2007/10/3, Sergey Konoplev <gray.ru@xxxxxxxxx>:
> Hi all,
>
> I often face with buzz queries (see below). I've looked through pg
> manual and huge amount of forums and mail archives and found nothing.
> The only solution  is to restart postgres server. Moreover I have to
> terminate the process using HUP signal to stop the server.
>
> 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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[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