Re: Meaning of transaction pg_locks?

From: "Robert Haas" <robertmhaas(at)gmail(dot)com>
To: "Philip Warner" <pjw(at)rhyme(dot)com(dot)au>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Meaning of transaction pg_locks?
Date: 2008-11-12 04:36:34
Message-ID: 603c8f070811112036i1460e0fia9cf758ddaf04e3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

It might be helpful to look at pg_stat_activity.

...Robert

On Tue, Nov 11, 2008 at 10:08 PM, Philip Warner <pjw(at)rhyme(dot)com(dot)au> wrote:
> Tom Lane wrote:
>> Neither are we, because you left out all the columns that might tell
>> that ...
>>
>
> The columns are actually blank....it's the other rows I left out with
> the row-level locks:
>
> 925282231 | 925280527 | | 62814 | RowExclusiveLock | t
> 925282208 | 925280527 | | 62814 | RowExclusiveLock | t
> | | 1192675195 | 62814 | ExclusiveLock | t
> 925282207 | 925280527 | | 62814 | RowExclusiveLock | t
> 925282025 | 925280527 | | 62814 | AccessShareLock | t
> 925282025 | 925280527 | | 62814 | RowExclusiveLock | t
> 925282206 | 925280527 | | 62814 | RowExclusiveLock | t
> 925282212 | 925280527 | | 62814 | RowExclusiveLock | t
> 925282210 | 925280527 | | 62814 | RowExclusiveLock | t
> 925282209 | 925280527 | | 62814 | RowExclusiveLock | t
> 925281338 | 925280527 | | 62814 | AccessShareLock | t
> 925281338 | 925280527 | | 62814 | RowExclusiveLock | t
> 925282211 | 925280527 | | 62814 | RowExclusiveLock | t
> 925282213 | 925280527 | | 62814 | RowExclusiveLock | t
>
> So I assume the processes waiting on the TX were waiting for one or more
> of those rows.
>
> Now I just need to figure out why the rows were locked for such a long
> time (the row level locks are mostly on one table and various indexes of
> that table).
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2008-11-12 06:15:06 Re: SSL cleanups/hostname verification
Previous Message Alex Hunsaker 2008-11-12 04:28:57 Re: SSL cleanups/hostname verification