Search Postgresql Archives

Re: What do you do with a long running rollback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Cawley <cj_cawley@xxxxxxxxx> 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





[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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux