Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XHd6V-0002eM-SA for pgsql-docs@arkaria.postgresql.org; Wed, 13 Aug 2014 18:16:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XHd6V-0005p0-92 for pgsql-docs@arkaria.postgresql.org; Wed, 13 Aug 2014 18:16:55 +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 1XHd6U-0005ot-OH for pgsql-docs@postgresql.org; Wed, 13 Aug 2014 18:16:54 +0000 Received: from 01.zmailcloud.com ([192.198.85.104] helo=mx-out-1.zmailcloud.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XHd6O-000797-RY for pgsql-docs@postgresql.org; Wed, 13 Aug 2014 18:16:53 +0000 Received: from smtp.01.com (smtp.01.com [10.10.0.43]) by mx-out-1.zmailcloud.com (Postfix) with ESMTP id 0BEBE5641D2; Wed, 13 Aug 2014 13:16:47 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id EBC99603D2; Wed, 13 Aug 2014 13:16:46 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uwqPz-utTDPS; Wed, 13 Aug 2014 13:16:46 -0500 (CDT) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id C00556041B; Wed, 13 Aug 2014 13:16:46 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id B1A9660410; Wed, 13 Aug 2014 13:16:46 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6EtCNWf1Pr-v; Wed, 13 Aug 2014 13:16:46 -0500 (CDT) Received: from [172.47.23.104] (70-36-143-82.dsl.dynamic.sonic.net [70.36.143.82]) by smtp-out-2.01.com (Postfix) with ESMTPSA id 0E779603D2; Wed, 13 Aug 2014 13:16:45 -0500 (CDT) Message-ID: <53EBAB8C.40305@agliodbs.com> Date: Wed, 13 Aug 2014 11:16:44 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: MauMau , Kevin Grittner , pgsql-docs@postgresql.org Subject: Re: Sample archive_command is still problematic References: <53E5603B.5040102@agliodbs.com> <1407777686.41146.YahooMailNeo@web122306.mail.ne1.yahoo.com> <0F73426A2EA544878BCAC33BB989D671@maumau> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On 08/11/2014 03:23 PM, MauMau wrote: > From: "Kevin Grittner" > The problem with the recommended command is that cp is not atomic. > The file can be read before the contents are materialized, causing > early end to recovery. I have seen it happen. The right way to do > this is to copy to a different name or directory and mv the file > into place once it is complete -- or use software which does that > automatically, like rsync does. > > > I submitted a patch a patch for this a few months ago, which is pg_copy > listed in the current CF. The patch also addresses the problem that the > archived file can get lost after power failure because it is not flushed > to disk. The patch consists of a program called pg_copy which can be > used instead of cp/copy, and a doc fix to suggest using mv. I made it > following the favorable suggestions from people. Yah? Does it work on Windows? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs