select on 22 GB table causes "An I/O error occured while sending to the backend." exception - Mailing list pgsql-performance

Hi,

We're currently having a problem with queries on a medium sized table. This table is 22GB in size (via select
pg_size_pretty(pg_relation_size('table'));).It has 7 indexes, which bring the total size of the table to 35 GB
(measuredwith pg_total_relation_size). 

On this table we're inserting records with a relatively low frequency of +- 6~10 per second. We're using PG 8.3.1 on a
machinewith two dual core 2.4Ghz XEON CPUs, 16 GB of memory and Debian Linux. The machine is completely devoted to PG,
nothingelse runs on the box. 

Lately we're getting a lot of exceptions from the Java process that does these inserts: "An I/O error occured while
sendingto the backend." No other information is provided with this exception (besides the stack trace of course). The
patternis that for about a minute, almost every insert to this 22 GB table results in this exception. After this minute
everythingis suddenly fine and PG happily accepts all inserts again. We tried to nail the problem down, and it seems
thatevery time this happens, a select query on this same table is in progress. This select query starts right before
theinsert problems begin and most often right after this select query finishes executing, inserts are fine again.
Sometimesthough inserts only fail in the middle of the execution of this select query. E.g. if the select query starts
at12:00 and ends at 12:03, inserts fail from 12:01 to 12:02. 

We have spend a lot of hours in getting to the bottom of this, but our ideas for fixing this problem are more or less
exhaustedat the moment. 

I wonder if anyone recognizes this problem and could give some pointers to stuff that we could investigate next.

Thanks a lot in advance.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

pgsql-performance by date:

Previous
From: "Frank Joerdens"
Date:
Subject: Query w empty result set with LIMIT orders of magnitude slower than without
Next
From: Jerry Champlin
Date:
Subject: Re: Autovacuum does not stay turned off