Re: SELECT Query on DB table preventing inserts

From: "Tomas Vondra" <tv(at)fuzzy(dot)cz>
To: "Dan Scott" <danieljamesscott(at)gmail(dot)com>
Cc: "Daniel Verite" <daniel(at)manitou-mail(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT Query on DB table preventing inserts
Date: 2011-08-31 13:40:08
Message-ID: 0d713963d00000bcbf09c74921a84d1d.squirrel@sq.gransy.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 31 Srpen 2011, 1:07, Dan Scott wrote:
> On Tue, Aug 30, 2011 at 13:52, Daniel Verite <daniel(at)manitou-mail(dot)org>
> wrote:
>>        Dan Scott wrote:
>>
>>> the insert process is unable to insert new rows into the database
>>
>> You should probably provide the error message on insert or otherwise
>> describe
>> how it's not working. Normally reading does not unintentionally prevent
>> writing in a concurrent session.
>
> I've investigated a little further and it seems that they don't really
> 'fail'. Just start taking significantly longer to insert, and the
> messages start backing up and eventually stop being sent because

What messages are you talking about?

> they're not being acknowledged. I can see a few "WARNING: pgstat wait
> timeout" messages around the time that this is happening in the
> syslog.

The pgstat messages are a typical symptom of I/O bottleneck - it just
means you'ro doing a lot of writes, more than the drives can take. Enable
checkpoint logging (log_checkpoints=on) and watch the system stats (e.g.
using 'iostat -x' or vmstat), my bet is this is a checkpoint or pdflush
issue.

Anyway we need more info about your system - Pg version, amount of RAM,
shared buffers, checkpoint settings (segments, completion) and page cache
config (/proc/sys/vm/). A few lines of vmstat/iostat output would help
too.

Tomas

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-08-31 13:55:35 Re: heavy swapping, not sure why
Previous Message Thomas Kellerer 2011-08-31 12:09:29 Re: ERD Tool