Skip site navigation (1) Skip section navigation (2)

Re: TRUNCATE HANGS

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <pgsql-bugs(at)postgresql(dot)org>,<tmoore(at)ttitech(dot)net>
Subject: Re: TRUNCATE HANGS
Date: 2010-12-04 19:57:03
Message-ID: 4CFA48AF02000025000382BB@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-bugs
tmoore  wrote:
 
> The test is not doing any transaction based work, the write
> functions just do sql insert, no begin commit blocks at the
> application level.
 
Well something is starting transactions; otherwise you wouldn't have
a transaction sitting "idle in transaction".  Are you perhaps
accessing the database through Java with setAutoCommit(false)?  (This
is one of many ways you could have a transaction pending.)
 
Whatever is starting the transactions is connecting through the local
loopback address, since that connection is showing IP address
127.0.0.1.  It's connecting to uisdb as the postgres user.  Other
connections are not using TCP connections, which is why I suspected
it might be a Java process -- the JDBC driver always uses a TCP
connection.
 
> Any tips on interpreting pg_locks ?
 
http://wiki.postgresql.org/wiki/Lock_Monitoring
 
> No blocking occurred.
 
I'm not following you.  Originally you were saying that there was a
deadlock, which is a set of blocks which form a cycle.  You also
said that things were stuck until you killed a particular connection,
at which point things got moving again, which at least suggests the
possibility of blocking.  One of the connections you showed reported
that it was waiting, which I think means it is blocked.  You showed
one process idle in transaction, and most locks are released at
transaction completion.  Why do you say there was no blocking?
 
-Kevin

Responses

pgsql-bugs by date

Next:From: tmooreDate: 2010-12-04 20:36:21
Subject: Re: TRUNCATE HANGS
Previous:From: tmooreDate: 2010-12-04 19:26:54
Subject: Re: TRUNCATE HANGS

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group