Re: What do you do with a long running rollback

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: What do you do with a long running rollback
Дата
Msg-id 444716.1637955869@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-general
Chris Cawley <cj_cawley@yahoo.com> writes:
> Here's the query :

> | SELECT pid, age(clock_timestamp(), query_start), usename, query  |
> |  | FROM pg_stat_activity  |
> |  | WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'  |
> |  | ORDER BY query_start desc; |

> Return output is pid | 4 days | user | ROLLBACK

I think the fault's in your query; it's presuming a long-obsolete
convention about how idle sessions are represented in pg_stat_activity.
These days you should be filtering on "state" or "wait_event_type".
This output is just telling you that the last thing that session
did, four days ago, was a ROLLBACK.

            regards, tom lane



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

Предыдущее
От: Ron
Дата:
Сообщение: Re: Merge into does not work
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Merge into does not work