What does this mean when the PostgreSQL process is "idle in a transaction"?

What does it mean when a PostgreSQL process is “transaction free”?

On the server I'm looking at, the output of "ps ax | grep postgres" I see 9 PostgreSQL processes that look like this:

postgres: user db 127.0.0.1(55658) idle in transaction 

Does this mean that some of the processes freeze while awaiting a transaction? Any pointers to relevant documentation are appreciated.

+57
postgresql
Sep 09 '08 at 0:40
source share
2 answers

The PostgreSQL manual indicates that this means the transaction is open (inside BEGIN) and inactive. Most likely, the user connects to a monitor that thinks or prints. I also have many of these in my system.

If you are using Slony for replication, the Slony-I FAQ suggests idle in transaction may mean that the network connection has been abruptly terminated. See the discussion in this FAQ for more details.

+33
Sep 09 '08 at 1:07
source share

As mentioned here: Re: BUG # 4243: Idle in transaction , it is probably best to check your pg_locks table to see what is locked and this may give you a better hint where the problem is.

+9
Sep 16 '08 at 22:55
source share



All Articles