Re: locking issue on simple selects? - Mailing list pgsql-performance

From Tobias Brox
Subject Re: locking issue on simple selects?
Date
Msg-id AANLkTinzrMySq-sRyuuwhY34fSVVFVBjP5u3xyFiNsiz@mail.gmail.com
Whole thread Raw
In response to locking issue on simple selects?  (Tobias Brox <tobixen@gmail.com>)
Responses Re: locking issue on simple selects?
List pgsql-performance
On 15 September 2010 12:05, Tobias Brox <tobixen@gmail.com> wrote:
> Recently we've frequently encountered issues where some simple selects
> (meaning, selects doing an index lookup and fetching one row) have
> become stuck for several minutes.  Apparently all requests on one
> exact table gets stuck, all requests not related to said table are
> going through without any problems.

Now I've set up all kind of logging regarding locks, so it seems like
we're having issues that aren't lock-related.  I just did a bit of
research into one situation today.

All while having this problem, there was one heavy query running in
parallell ... not sure if that's relevant.

Then comes one query that requires a seq scan on the problem table
(that won't happen again - I just added a new index).  Four seconds
later comes another query requiring a simple index lookup.  Still more
queries comes in, most of them simple index lookups, but on different
indexes.  After one minute there are 25 queries in the
pg_stat_activity view towards this table.  It's not a particularly
huge table.  Moments later all 25 queries have been executed.

pgsql-performance by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: how to enforce index sub-select over filter+seqscan
Next
From: "Kevin Grittner"
Date:
Subject: Re: locking issue on simple selects?