Re: pg_stat_activity

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: pg_stat_activity
Дата
Msg-id CAMkU=1whLR5Ud0BsgKmk8AKLXaVZqNopZHHsymXorDhJRMi-Pg@mail.gmail.com
обсуждение исходный текст
Ответ на pg_stat_activity  (Bala Venkat <akpgeek@gmail.com>)
Ответы Re: pg_stat_activity  (David Johnston <polobo@yahoo.com>)
Список pgsql-general
On Wed, Apr 2, 2014 at 12:00 PM, Bala Venkat <akpgeek@gmail.com> wrote:
We are using postgres 9.0.  When I looked at the pg_stat_activity table.

I have some rows where there is difference of 2 hours between  backend_start  and xact_start

But there is only few milli seconds between xact_start and query_start. 

All them have wait as false.

My question is,  is the query still executing and also why would there be that much time difference between backend_start  and xact_start

Say I connect to the database, and then I go to lunch for 2 hours.  Then I come back and start a transaction.  

Or, I connect to the database and run a two-hour query.  Then rollback/commit that, and I start another transaction.

To know the state of the query, look at the "current_query"  field.  (In newer versions, look in "state" field, but that is not in 9.0)
 
Cheers,

Jeff

В списке pgsql-general по дате отправления:

Предыдущее
От: Bala Venkat
Дата:
Сообщение: pg_stat_activity
Следующее
От: Bret Stern
Дата:
Сообщение: SSD Drives