Re: Statistics collection question

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: "phoenix(dot)kiula(at)gmail(dot)com" <phoenix(dot)kiula(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Statistics collection question
Date: 2007-09-10 19:17:00
Message-ID: 20070910191700.GH16512@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 10, 2007 at 07:05:54PM -0000, phoenix(dot)kiula(at)gmail(dot)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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message novnov 2007-09-10 19:44:04 Re: Time Zone design issues
Previous Message phoenix.kiula@gmail.com 2007-09-10 19:05:54 Re: Statistics collection question