Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DE1C4650214 for ; Thu, 28 Aug 2008 19:42:51 -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 73629-04 for ; Thu, 28 Aug 2008 19:42:44 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.225]) by postgresql.org (Postfix) with ESMTP id B1BC56500D5 for ; Thu, 28 Aug 2008 19:42:48 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so774535rvf.43 for ; Thu, 28 Aug 2008 15:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=ySFUoVyR6UE6NAGVybh5lI3lxgDHf2eVSOw3FzYadRg=; b=YgZLh6n9v0/ntyGt95N0Z3jT51cYIGg+BDEmFLeIrkXTpQKH05yBii/Wo+4cyePt6x 3/DTkdHDBDQ90IdEKr2MQeH5CroZrWBYbEUkC9i5Ufh5UJcoE8w6Z1Fq3udfaMFLmSBk r/QGnLJ9V4VIbMyaUQSFkCCo1Q12JA9f30lTQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=RJAOrVJYa9eAT6abd/VnDfs1bVbiy1Igog6O9hzTsdTSL6S5jFiadgNAezIJGmDG5p eEhMGb1ABhwwJTt/fNlIAtKtBWfTNnUC/fRd2w16fDx3R+7haAgcYNqQDOHRPw2FEAZD rRVL7mZGDzrF04vafEOhzEdgreKlAFRHQb3Mo= Received: by 10.141.162.1 with SMTP id p1mr1098793rvo.39.1219963367492; Thu, 28 Aug 2008 15:42:47 -0700 (PDT) Received: by 10.141.197.1 with HTTP; Thu, 28 Aug 2008 15:42:47 -0700 (PDT) Message-ID: Date: Thu, 28 Aug 2008 16:42:47 -0600 From: "Scott Marlowe" To: "Matthew Wakeling" Subject: Re: select on 22 GB table causes "An I/O error occured while sending to the backend." exception Cc: "PostgreSQL Performance" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <82bpze3ou8.fsf@mid.bfk.de> <48B6EA7E.2090707@emolecules.com> 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/395 X-Sequence-Number: 31276 On Thu, Aug 28, 2008 at 2:29 PM, Matthew Wakeling wrote: > Another point is that from a business perspective, a database that has > stopped responding is equally bad regardless of whether that is because the > OOM killer has appeared or because the machine is thrashing. In both cases, > there is a maximum throughput that the machine can handle, and if requests > appear quicker than that the system will collapse, especially if the > requests start timing out and being retried. But there's a HUGE difference between a machine that has bogged down under load so badly that you have to reset it and a machine that's had the postmaster slaughtered by the OOM killer. In the first situation, while the machine is unresponsive, it should come right back up with a coherent database after the restart. OTOH, a machine with a dead postmaster is far more likely to have a corrupted database when it gets restarted. > Likewise, I would be all for Postgres managing its memory better. It would > be very nice to be able to set a maximum amount of work-memory, rather than > a maximum amount per backend. Each backend could then make do with however > much is left of the work-memory pool when it actually executes queries. As > it is, the server admin has no idea how many multiples of work-mem are going > to be actually used, even knowing the maximum number of backends. Agreed. It would be useful to have a cap on all work_mem, but it might be an issue that causes all the backends to talk to each other, which can be really slow if you're running a thousand or so connections.