Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 4596464FCC1 for ; Tue, 26 Aug 2008 13:44:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 63330-04 for ; Tue, 26 Aug 2008 13:44:03 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from bay0-omc2-s26.bay0.hotmail.com (bay0-omc2-s26.bay0.hotmail.com [65.54.246.162]) by postgresql.org (Postfix) with ESMTP id 9FAA064FCC0 for ; Tue, 26 Aug 2008 13:44:03 -0300 (ADT) Received: from BAY124-W57 ([207.46.11.220]) by bay0-omc2-s26.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 26 Aug 2008 09:44:02 -0700 Message-ID: X-Originating-IP: [80.101.123.149] From: henk de wit To: Subject: select on 22 GB table causes "An I/O error occured while sending to the backend." exception Date: Tue, 26 Aug 2008 18:44:02 +0200 Importance: Normal Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 26 Aug 2008 16:44:02.0187 (UTC) FILETIME=[F1EB7DB0:01C9079A] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/331 X-Sequence-Number: 31212 Hi=2C 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')= )=3B). It has 7 indexes=2C which bring the total size of the table to 35 GB= (measured with 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 machine with two dual core 2.4G= hz XEON CPUs=2C 16 GB of memory and Debian Linux. The machine is completely= devoted to PG=2C nothing else runs on the box. Lately we're getting a lot of exceptions from the Java process that does th= ese inserts: "An I/O error occured while sending to the backend." No other = information is provided with this exception (besides the stack trace of cou= rse). The pattern is that for about a minute=2C almost every insert to this= 22 GB table results in this exception. After this minute everything is sud= denly fine and PG happily accepts all inserts again. We tried to nail the p= roblem down=2C and it seems that every time this happens=2C a select query = on this same table is in progress. This select query starts right before th= e insert problems begin and most often right after this select query finish= es executing=2C inserts are fine again. Sometimes though inserts only fail = in the middle of the execution of this select query. E.g. if the select que= ry starts at 12:00 and ends at 12:03=2C inserts fail from 12:01 to 12:02. We have spend a lot of hours in getting to the bottom of this=2C but our id= eas for fixing this problem are more or less exhausted at the moment. I wonder if anyone recognizes this problem and could give some pointers to = stuff that we could investigate next.=20 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/=