Re: Statistics collection question - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Statistics collection question
Date
Msg-id 20070910191700.GH16512@svana.org
Whole thread Raw
In response to Re: Statistics collection question  ("phoenix.kiula@gmail.com" <phoenix.kiula@gmail.com>)
List pgsql-general
On Mon, Sep 10, 2007 at 07:05:54PM -0000, phoenix.kiula@gmail.com 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   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: "phoenix.kiula@gmail.com"
Date:
Subject: Re: Statistics collection question
Next
From: novnov
Date:
Subject: Re: Time Zone design issues