Обсуждение: Runaway postgres process?

Поиск
Список
Период
Сортировка

Runaway postgres process?

От
A B
Дата:
Hi.
I just discovered three "postmaster" processes running and really
eating all the cpu.
I'm not sure why?
So, what steps do I take for finiding the queries that is causing this?

Re: Runaway postgres process?

От
A B
Дата:
Well, it stoped. And in the log I can see:

LOGG:  statement: UPDATE VList SET updated=true WHERE id=985
LOGG:  duration: 1129993.209 ms

and a few lines below
(with queries in between)

LOGG:  statement: UPDATE VList SET updated=false WHERE id=985
LOGG:  duration: 0.400 ms

So, something was blocking the query, seriously!
Still interested in findingout how to detect what is going on.
There were other  processes, could it be a lock? I have not specified
any special transaction or so. I was calling from a PHP script (I
think).

2009/1/30 A B <gentosaker@gmail.com>:
> Hi.
> I just discovered three "postmaster" processes running and really
> eating all the cpu.
> I'm not sure why?
> So, what steps do I take for finiding the queries that is causing this?
>

Re: Runaway postgres process?

От
A B
Дата:
2009/1/30 Laurent Wandrebeck <l.wandrebeck@gmail.com>:
> 2009/1/30 A B <gentosaker@gmail.com>:
>> Hi.
> Hello,
>> I just discovered three "postmaster" processes running and really
>> eating all the cpu.
>> I'm not sure why?
>> So, what steps do I take for finiding the queries that is causing this?
> select * from pg_catalog.pg_stat_activity;

Ah, great!

Some things: In the field query_start it is empty, and the
current_query field says: "<command string not enabled>" but that
seems to be fixed by turning on "stats_command_string".

What does the backend_start field indicate?