Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XqZ3o-0007bl-CL for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Nov 2014 03:02:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XqZ3n-0006iK-Nt for pgsql-bugs@arkaria.postgresql.org; Tue, 18 Nov 2014 03:02:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XqZ3m-0006iD-PS for pgsql-bugs@postgresql.org; Tue, 18 Nov 2014 03:02:30 +0000 Received: from hogranch.com ([75.101.82.47]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XqZ3h-0002vc-QS for pgsql-bugs@postgresql.org; Tue, 18 Nov 2014 03:02:29 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id sAI32HH10555 for ; Mon, 17 Nov 2014 19:02:17 -0800 Message-ID: <546AB6B7.2070606@hogranch.com> Date: Mon, 17 Nov 2014 19:02:15 -0800 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: pgsql-bugs@postgresql.org Subject: Re: BUG #11991: dangerous action of pg_dump References: <20141117214211.2475.5375@wrigleys.postgresql.org> In-Reply-To: <20141117214211.2475.5375@wrigleys.postgresql.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean 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 On 11/17/2014 1:42 PM, tomek@rai.pl wrote: > Bug reference: 11991 > Logged by: Tomasz Kimaczynski > Email address:tomek@rai.pl > PostgreSQL version: 9.2.9 > Operating system: Windows 2003,2008,2012 & FreeBSD > Description: > > Recently, I realized pg_dump dangerous activity. In case when no dump is > made because of any error, created file size is 0 bytes. In case when this > file is used in simple backup procedure which make copy of dump file - 0 > bytes files overwrite earlier correct dump files. > And we have no copies. > Conclusion: pg_dump can not create 0 bytes files - it should create > nothing. > I think it's important. perhaps your pg_dump script should check for errors from the pg_dump run, and if any errors, delete the erroneous dump. -- john r pierce 37N 122W somewhere on the middle of the left coast -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs