Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UrqVa-0001K6-UQ for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Jun 2013 14:15:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1UrqVa-0006in-4T for pgsql-bugs@arkaria.postgresql.org; Wed, 26 Jun 2013 14:15:42 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UrqVZ-0006hY-1A for pgsql-bugs@postgresql.org; Wed, 26 Jun 2013 14:15:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1UrqVT-0007JH-3w for pgsql-bugs@postgresql.org; Wed, 26 Jun 2013 14:15:40 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id r5QEFP9Y006023; Wed, 26 Jun 2013 10:15:25 -0400 (EDT) From: Tom Lane To: Heikki Linnakangas cc: Andres Freund , Greg Stark , Jeff Davis , Yuri Levinsky , pgsql-bugs@postgresql.org Subject: Re: Postgres crash? could not write to log file: No space left on device In-reply-to: <51CAE128.3090203@vmware.com> 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> Comments: In-reply-to Heikki Linnakangas message dated "Wed, 26 Jun 2013 15:40:08 +0300" Date: Wed, 26 Jun 2013 10:15:25 -0400 Message-ID: <6022.1372256125@sss.pgh.pa.us> X-Pg-Spam-Score: -0.5 (/) 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 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. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs