Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aOOMZ-0002oS-DK for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Jan 2016 11:34:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aOOMY-0004ys-W8 for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Jan 2016 11:34:15 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aOOLv-000335-3m for pgsql-bugs@postgresql.org; Wed, 27 Jan 2016 11:33:35 +0000 Received: from out.smtp-auth.no-ip.com ([8.23.224.60]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aOOLs-0007ha-5y for pgsql-bugs@postgresql.org; Wed, 27 Jan 2016 11:33:33 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [212.76.254.194]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 0ABA8401C50; Wed, 27 Jan 2016 03:33:28 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 6CADF5D2; Wed, 27 Jan 2016 08:33:26 -0300 (CLT) Date: Wed, 27 Jan 2016 12:33:26 +0100 From: Alvaro Herrera To: Tom Lane Cc: Michael Paquier , kunschikov@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #13888: pg_dump write error Message-ID: <20160127113326.GA639380@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <40312.1453818954@sss.pgh.pa.us> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) 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 Tom Lane wrote: > Michael Paquier writes: > > On Tue, Jan 26, 2016 at 1:08 AM, Alvaro Herrera > > wrote: > >> Yeah, I noticed this and similar lacks of error checks in pg_dump in > >> code review, which I didn't get around to patching. Care to submit a > >> patch? > > > Indeed, with a closer look there are things like tarWrite that can > > return 0 and trigger WRITE_ERROR_EXIT with the same thing. Couldn't we > > simply check for errno = 0 and generate a more generic error message > > instead? Or are you willing at replacing all those things with just > > exit_horribly()? > > I do not understand these claims that there isn't an error check there. > There surely is. But fwrite() didn't set errno. Yeah, that's what I was remembering actually: http://www.postgresql.org/message-id/20150608174336.GM133018@postgresql.org > The real question is why did he get a short write in the first place. > We don't make any attempt to support filesystems that require retries, > which seems to be what is going on here. Should we? Sounds likely. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs