Re: locking issue on simple selects?

From: Tobias Brox <tobixen(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: locking issue on simple selects?
Date: 2010-09-23 20:47:26
Message-ID: AANLkTinzrMySq-sRyuuwhY34fSVVFVBjP5u3xyFiNsiz@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 15 September 2010 12:05, Tobias Brox <tobixen(at)gmail(dot)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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2010-09-23 20:55:54 Re: locking issue on simple selects?
Previous Message Merlin Moncure 2010-09-23 19:41:43 Re: how to enforce index sub-select over filter+seqscan