Re: lock contention, need profiling idea

From: AI Rumman <rummandba(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: lock contention, need profiling idea
Date: 2014-07-01 17:14:34
Message-ID: CAGoODpfkYJnfZhbfY0P8zB8zObcSJAqMsBCXOobQaKU0JGrejQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

There was no CREATE INDEX command running on the host.

On Mon, Jun 30, 2014 at 5:06 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:

>
>
>
> On Tue, Jul 1, 2014 at 7:36 AM, AI Rumman <rummandba(at)gmail(dot)com> wrote:
>
>> I see lots of similar log message at a certain time in a day on
>> Postgresql 9,.1:
>>
>> LOG: process 18855 still waiting for ShareLock on transaction 2856146023
>> after 1001.209 ms
>> STATEMENT: UPDATE table1 SET time = $1 WHERE id = $2
>>
>> The table1 size is 17 G.
>>
>> What could be the reason for this lock contention?
>> autovacuum?
>>
> This may be a CREATE INDEX query taking some time, perhaps combined with
> an old prepared transaction still holding a lock? Perhaps a cron job
> running behind that you are not aware of?
> You should have a look at pg_stat_activity, pg_prepared_xacts and pg_locks
> to get more information about the transactions running and the locks being
> taken.
> --
> Michael
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G Johnston 2014-07-01 17:28:14 Re: how to create a role with no privileges?
Previous Message Kynn Jones 2014-07-01 17:05:10 Re: how to create a role with no privileges?