From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Claudio Freire <klaussfreire(at)gmail(dot)com> |
Cc: | postgres performance list <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Blocking excessively in FOR UPDATE |
Date: | 2011-11-03 23:45:46 |
Message-ID: | 19908.1320363946@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Claudio Freire <klaussfreire(at)gmail(dot)com> writes:
> On Thu, Nov 3, 2011 at 4:29 PM, Claudio Freire <klaussfreire(at)gmail(dot)com> wrote:
>> Next time I find it blocking, I will check pg_locks directly and post
>> the output.
> Here it is, two instances of the query, while blocked:
Hmm ... definitely seems that you're not blocked on a FOR UPDATE tuple
lock. If you were, there'd be an ungranted ShareLock on a transactionid
in there.
It seems possible that you're blocked on an LWLock, which would not show
in pg_locks. But before pursuing that idea, probably first you should
back up and confirm whether the process is actually waiting, or running,
or just really slow due to CPU contention. It might be useful to see
what strace has to say about it.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2011-11-04 08:43:47 | Re: SSL encryption makes bytea transfer slow |
Previous Message | CS DBA | 2011-11-03 22:42:13 | Re: function slower than the same code in an sql file |