Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UtwiL-0007gh-Dj for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Jul 2013 09:17:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UtwiK-0003Lo-P7 for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Jul 2013 09:17:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UtwiJ-0003Lg-Rd for pgsql-bugs@postgresql.org; Tue, 02 Jul 2013 09:17:31 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UtwiE-00060V-OV for pgsql-bugs@postgresql.org; Tue, 02 Jul 2013 09:17:30 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 266BF299E0; Tue, 2 Jul 2013 02:17:25 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 228EBB06AC; Tue, 2 Jul 2013 02:17:25 -0700 (PDT) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 8D2D3120030; Tue, 2 Jul 2013 02:23:42 -0700 (PDT) Received: from [192.168.1.90] (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Tue, 2 Jul 2013 02:23:40 -0700 (PDT) Message-ID: <51D29AA0.3070509@vmware.com> Date: Tue, 02 Jul 2013 12:17:20 +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: Tom Lane CC: Andres Freund , Greg Stark , Jeff Davis , Yuri Levinsky , pgsql-bugs@postgresql.org, Magnus Hagander , Dave Page , Andrew Dunstan 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> <51CAE128.3090203@vmware.com> <6022.1372256125@sss.pgh.pa.us> In-Reply-To: <6022.1372256125@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -6.9 (------) 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 17:15, Tom Lane wrote: > Heikki Linnakangas writes: >> 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. > > Seems reasonable. My concern about the idea in general was the > impossibility of being sure we'd protected every single write() call. > But if we can identify specific call sites that seem at more risk than > most, I'm okay with adding extra logic there. Committed a patch to add retry loop to XLogWrite(). I noticed that FileWrite() has some additional Windows-specific code to also retry on an ERROR_NO_SYSTEM_RESOURCES error. That's a bit scary, because we don't check for that in any other write() calls in the backend. If we really need to be prepared for that on Windows, I think that would need to be in a wrapper function in src/port or src/backend/port. Would a Windows-person like to comment on 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