Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B498E64FD0A; Tue, 29 Jul 2008 11:27:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 19393-03; Tue, 29 Jul 2008 11:27:23 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 33F0764FCFE; Tue, 29 Jul 2008 11:27:29 -0300 (ADT) thread-index: Acjxh1lcmdbY7UvcQaGe/vn52aHvuQ== Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133 Received: from [80.222.78.63] ([80.222.78.63]) by mail01.enterprisedb.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 29 Jul 2008 10:28:20 -0400 Message-ID: <488F28CB.8000201@enterprisedb.com> Date: Tue, 29 Jul 2008 17:27:23 +0300 From: "Heikki Linnakangas" Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509) MIME-Version: 1.0 To: "Andrew Dunstan" Cc: "Greg Smith" , "Kevin Grittner" , "Simon Riggs" , "Bruce Momjian" , "Dave Page" , "PostgreSQL-development" , "List pgsql-patches" , "Martin Zaun" Subject: Re: [PATCHES] odd output in restore mode References: <200807011520.m61FKhZ20311@momjian.us> <48867904.9090001@sun.com> <1216810783.3894.602.camel@ebony.2ndQuadrant> <48877AC0.7070603@enterprisedb.com> <48873C7E.EE98.0025.0@wicourts.gov> <488DEE79.4010004@dunslane.net> In-Reply-To: <488DEE79.4010004@dunslane.net> Content-Type: text/plain; format=flowed; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 29 Jul 2008 14:28:20.0140 (UTC) FILETIME=[5950B6C0:01C8F187] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/1374 X-Sequence-Number: 121634 Andrew Dunstan wrote: > > > Greg Smith wrote: >> On Wed, 23 Jul 2008, Kevin Grittner wrote: >> >>> In our scripts we handle this by copying to a temp directory on the >>> same mount point as the archive directory and doing a mv to the >>> archive location when the copy is successfully completed. I think >>> that this even works on Windows. Could that just be documented as a >>> strong recommendation for the archive script? >> >> This is exactly what I always do. I think the way cp is shown in the >> examples promotes what's really a bad practice for lots of reasons, >> this particular problem being just one of them. >> >> I've been working on an improved archive_command shell script that I >> expect to submit for comments and potential inclusion in the >> documentation as a better base for other people to build on. This is >> one of the options for how it can operate. It would be painful but not >> impossible to convert a subset of that script to run under Windows as >> well, at least enough to cover this particular issue. > > A Perl script using the (standard) File::Copy module along with the > builtin function rename() should be moderately portable. It would to be > nice not to have to maintain two scripts. It's also not very nice to require a Perl installation on Windows, just for a replacement of Copy. Would a simple .bat script work? -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com