Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Urp1G-00053m-FT for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Jun 2013 12:40:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Urp1F-0003cS-Va for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Jun 2013 12:40:18 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Urp1E-0003cG-TD for pgsql-bugs@postgresql.org; Wed, 26 Jun 2013 12:40:17 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Urp1C-0005Tf-Az for pgsql-bugs@postgresql.org; Wed, 26 Jun 2013 12:40:16 +0000 Received: from sc9-mailhost1.vmware.com (sc9-mailhost1.vmware.com [10.113.161.71]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 73B00291B2; Wed, 26 Jun 2013 05:40:12 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (zcs-prod-ext-mta-2.vmware.com [10.113.62.224]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id 6D0621858B; Wed, 26 Jun 2013 05:40:12 -0700 (PDT) Received: from zcs-prod-ext-mta-2.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTP id 7135AC0052; Wed, 26 Jun 2013 05:40:04 -0700 (PDT) Received: from [192.168.1.70] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-2.vmware.com (Postfix) with ESMTPSA; Wed, 26 Jun 2013 05:40:02 -0700 (PDT) Message-ID: <51CAE128.3090203@vmware.com> Date: Wed, 26 Jun 2013 15:40:08 +0300 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Andres Freund CC: Greg Stark , Tom Lane , Jeff Davis , Yuri Levinsky , pgsql-bugs@postgresql.org Subject: Re: Postgres crash? could not write to log file: No space left on device References: <8881.1372168007@sss.pgh.pa.us> <1372203951.20761.4.camel@sussancws0025> <19878.1372204641@sss.pgh.pa.us> <20130626122105.GA6660@awork2.anarazel.de> In-Reply-To: <20130626122105.GA6660@awork2.anarazel.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -6.3 (------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 26.06.2013 15:21, Andres Freund wrote: > On 2013-06-26 13:14:37 +0100, Greg Stark wrote: >> On Wed, Jun 26, 2013 at 12:57 AM, Tom Lane wrote: >>> (Though if it is, it's not apparent why such >>> failures would only be manifesting on the pg_xlog files and not for >>> anything else.) >> >> Well data files are only ever written to in 8k chunks. Maybe these >> errors are only occuring on>8k xlog records such as records with >> multiple full page images. I'm not sure how much we write for other >> types of files but they won't be written to as frequently as xlog or >> data files and might not cause errors that are as noticeable. > > We only write xlog in XLOG_BLCKSZ units - which is 8kb by default as > well... Actually, XLogWrite() writes multiple pages at once. If all wal_buffers are dirty, it can try to write them all in one write() call. We've discussed retrying short writes before, and IIRC Tom has argued that it shouldn't be necessary when writing to disk. Nevertheless, I think we should retry in XLogWrite(). It can write much bigger chunks than most write() calls, so there's more room for a short write to happen there if it can happen at all. Secondly, it PANICs on failure, so it would be nice to try a bit harder to avoid that. - Heikki -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs