On Mon, Sep 10, 2007 at 07:05:54PM -0000, [EMAIL PROTECTED] wrote: > When I do a "select * from pg_locks", some of them show up as > "Exclusive Lock". This I suppose means that the whole table is locked, > right? How can I find from the "transaction id" which precise SQL > statement is taking this time? I do not have anything that should! > Simple SELECT, INSERT and UPDATE stuff in our fairly straightforward > application, and I hope that autovacuum and auto-analyze do not take > up this exclusive locks?
Note: the example ExclusiveLock you showed is merely the transaction holding an exclusive lock on itself. As you can see, there is no database or relation mentioned, so it's not locking anything else. It has a shared lock on a table, but that's normal. For more info the activity, try "select * from pg_stat_activity;" Hope this helps, -- Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to > litigate.
signature.asc
Description: Digital signature