Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aO4ix-0005OJ-Er for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Jan 2016 14:36:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aO4ix-0004z6-1g for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Jan 2016 14:36:03 +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 1aO4iv-0004ue-QE for pgsql-bugs@postgresql.org; Tue, 26 Jan 2016 14:36:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aO4it-00070E-53 for pgsql-bugs@postgresql.org; Tue, 26 Jan 2016 14:36:00 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u0QEZt5c005196; Tue, 26 Jan 2016 09:35:55 -0500 From: Tom Lane To: Michael Paquier cc: Alvaro Herrera , kunschikov@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #13888: pg_dump write error In-reply-to: References: <20160125143008.2539.2878@wrigleys.postgresql.org> <20160125160840.GA510163@alvherre.pgsql> Comments: In-reply-to Michael Paquier message dated "Tue, 26 Jan 2016 22:14:44 +0900" Date: Tue, 26 Jan 2016 09:35:54 -0500 Message-ID: <40312.1453818954@sss.pgh.pa.us> X-Pg-Spam-Score: -1.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 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. 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? 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