pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tobias Brox <tobixen@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: locking issue on simple selects?
Date: Wed, 15 Sep 2010 09:39:47 -0400
Message-ID: <4096.1284557987@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTikh++7mouBb7cr2C9zMPKtRffVxDK0QFTf16HLo@mail.gmail.com>
References: <AANLkTikh++7mouBb7cr2C9zMPKtRffVxDK0QFTf16HLo@mail.gmail.com>

Tobias Brox <tobixen@gmail.com> writes:
> 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.  According to the pg_stat_activity
> view, all queries getting stuck was read-queries (selects), no updates
> or anything like that (some of the transactions were doing updates
> and/or inserts though).

> The obvious thought seems to be that this is a locking issue ... but
> it doesn't seem so.  For one thing, AFAIK locking shouldn't affect
> selects, only updates?

An exclusive lock will block selects too.  Have you looked into pg_locks
for ungranted lock requests?

			regards, tom lane



view thread (12+ messages)  latest in thread

Message-ID: <4096.1284557987@sss.pgh.pa.us>
Permalink:  ../4096.1284557987@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4096.1284557987@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tobixen@gmail.com
  Subject: Re: locking issue on simple selects?
  In-Reply-To: <4096.1284557987@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox