Re: Why are a lot of ROLLBACK queries in idle state

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Why are a lot of ROLLBACK queries in idle state
Date: 2016-11-18 10:26:03
Message-ID: o0mkvn$d1p$1@blaine.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

rajan schrieb am 18.11.2016 um 10:55:
> When querying the pg_stat_acitivity I find a lot of ROLLBACK queries in idle
> state. Can someone help me know why?
>
> Thanks in advance.
>
> select query, state, waiting, query_start from pg_stat_activity where query
> ilike '%rollback%';

The _session_ is idle, not the query.

Quote from the manual:

If the session is idle, the "query" column of pg_stat_activity shows the last executed statement in that session.

So this simply means all those sessions properly ended their transaction using a ROLLBACK statement.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message rajan 2016-11-18 11:17:12 Re: WAL restoration is not happening completely
Previous Message rajan 2016-11-18 09:55:27 Why are a lot of ROLLBACK queries in idle state