Tomasz Rakowski wrote: > I'm facing frustrating problem with locking in > postgres server. I have application which do update > one table few thousands time each minute. From time to > time call to database is locked and is waiting for something > (In pgAdmin3 in 'Server Status' window in 'Lock' tab I > can see UPDATE statement siting there for hours... and > usually it is the the only lock! ) At the same time I > can connect to database from other applications > (including pgAdmin3) and do any query on that table. SELECT statements are never blocked by row locks, so the latter is not surprising. The first step is probably to find out what holds the lock for such a long time: When the hang occurs, do a 'SELECT * FROM pg_locks', that should show you which backend is waiting for the lock and which backend holds it. If you have stats_command_string set to on, you will see the executing statement in pg_stat_activity. Yours, Laurenz Albe