Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XHg1c-0001BO-Rg for pgsql-docs@arkaria.postgresql.org; Wed, 13 Aug 2014 21:24:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XHg1c-0006hV-4d for pgsql-docs@arkaria.postgresql.org; Wed, 13 Aug 2014 21:24:04 +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 1XHg1b-0006hO-6q for pgsql-docs@postgresql.org; Wed, 13 Aug 2014 21:24:03 +0000 Received: from nm3-vm2.bullet.mail.ne1.yahoo.com ([98.138.91.19]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XHg1V-0002B8-Vz for pgsql-docs@postgresql.org; Wed, 13 Aug 2014 21:24:01 +0000 Received: from [98.138.101.128] by nm3.bullet.mail.ne1.yahoo.com with NNFMP; 13 Aug 2014 21:23:54 -0000 Received: from [98.138.226.167] by tm16.bullet.mail.ne1.yahoo.com with NNFMP; 13 Aug 2014 21:23:54 -0000 Received: from [127.0.0.1] by omp1068.mail.ne1.yahoo.com with NNFMP; 13 Aug 2014 21:23:54 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 943040.502.bm@omp1068.mail.ne1.yahoo.com Received: (qmail 64541 invoked by uid 60001); 13 Aug 2014 21:23:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1407965034; bh=m5WYYuo5VQxaTxyvyyVkKA4WRcXbslvC5m4jjcwJ9go=; h=References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=sPVMFcBrli/MrDwtA0DFL5qcxsYaccj+YpB9gnTPawT6ovkllu/zZAljRQI9od0cUI2iCE6rG6bxDF9817nNofT7H0iuq/orJAnEyPNtzqH+4smvzY1l9J3u0WKFoZdNGK4GgEWEMY0xJx8G074yG1zlEJxKtuJMXfEOlCdZgTE= X-YMail-OSG: aLo0c10VM1mPXbOZgXWfCw34Z2.IWlJ_z1WiB5Uoi8MZlO1 pAH_LubaiNwS0FB_Xgr0HvHnNEkR48dNdFQpCUbGVp.hrg8heFl0htRtY0hm XY.7wz9isT1YD3S8sMlauPRd13nwwG0WTulsihaMbA4XdbYaBQlvL3r0c43q 0SrojTeIj9f44RYEXwNrsIqCq7UYIlZkQMDyutw4PsxOV8YLNcmxs6DPM7Sv gJVmDZZU7e97XyIQ1ZjyWBZTbcA0TtIZu6pUZbuWPcqt5NLIXhG9bkhX_r9q KswIKcwRW7DARYhDrs3fehrPMj.dw.yLpYs9gR0R0J4pOBV_nMjwNOiCsH3x _QriMGE8Ke789iEZv_QqKV3IV9CTBnl.9qT.OxgHKdglslwkGqt4V6Jr4TQ3 8PtUvZ1x4YM97UvLwRwZddSAVPtod.__FXpGiGS70KFLl.1GurvwhGy1JaLk jOfjW0.oTO9sB6KB9lvvLOgROaQFc3vV0KATjaJrtEDXKspuxp8kCeeH4qbS RYa2eNX56eFdnDh2VmO2D82N_2fVGGh.lYQVcs9yFmgs9bOnwTChaTXU.dGV drjFc064ulo4HbBkSB5vj Received: from [24.178.25.147] by web122304.mail.ne1.yahoo.com via HTTP; Wed, 13 Aug 2014 14:23:54 PDT X-Rocket-MIMEInfo: 002.001, UGV0ZXIgRWlzZW50cmF1dCA8cGV0ZXJfZUBnbXgubmV0PiB3cm90ZToKPiBPbiA4LzExLzE0IDY6MjMgUE0sIE1hdU1hdSB3cm90ZToKPgo.PiBJIHN1Ym1pdHRlZCBhIHBhdGNoIGEgcGF0Y2ggZm9yIHRoaXMgYSBmZXcgbW9udGhzIGFnbywgd2hpY2ggaXMgcGdfY29weQo.PiBsaXN0ZWQgaW4gdGhlIGN1cnJlbnQgQ0YuwqAgVGhlIHBhdGNoIGFsc28gYWRkcmVzc2VzIHRoZSBwcm9ibGVtIHRoYXQgdGhlCj4.IGFyY2hpdmVkIGZpbGUgY2FuIGdldCBsb3N0IGFmdGVyIHBvd2VyIGZhaWx1cmUgYmVjYXVzZSABMAEBAQE- X-Mailer: YahooMailWebService/0.8.201.700 References: <53E5603B.5040102@agliodbs.com> <1407777686.41146.YahooMailNeo@web122306.mail.ne1.yahoo.com> <0F73426A2EA544878BCAC33BB989D671@maumau> <53EBCCEA.3090604@gmx.net> Message-ID: <1407965034.12878.YahooMailNeo@web122304.mail.ne1.yahoo.com> Date: Wed, 13 Aug 2014 14:23:54 -0700 From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: Sample archive_command is still problematic To: Peter Eisentraut , MauMau , Josh Berkus , "pgsql-docs@postgresql.org" In-Reply-To: <53EBCCEA.3090604@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.0 (--) 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 Peter Eisentraut wrote: > On 8/11/14 6:23 PM, MauMau wrote: > >> I submitted a patch a patch for this a few months ago, which is pg_copy >> listed in the current CF.=A0 The patch also addresses the problem that t= he >> archived file can get lost after power failure because it is not flushed >> to disk.=A0=A0=A0 The patch consists of a program called pg_copy which c= an be >> used instead of cp/copy, and a doc fix to suggest using mv.=A0 I made it >> following the favorable suggestions from people. > > I realize that there are about 128 different ways people set this up > (which is itself a problem), but it appears to me that a solution like > pg_copy only provides local copying, which implies the use of something > like NFS. Not necessarily.=A0 What I have done is to use the cp/mv technique on=20 the database server and then rsync (through ssh) from each place=20 that needs it.=A0 That seems to me much less fragile than copying to=20 an NFS mount point. > Also, I think you can get local copy+fsync with dd. Does the directory entry only become visible to other processes=20 once the file is complete when you use dd? > The alternatives of doing remote copying inside archive_command are also > questionable if you have multiple standbys. Right.=A0 It's a nightmare to try to design anything to serve=20 multiple standbys without having the initial archive be local and=20 copying from that archive to the others.=A0 At least, if there is=20 some other good solution, I have yet to see it. The above is regarding WAL file archiving -- I'm not putting down=20 streaming replication.=A0 Of course, what I would have *really* liked=20 is a WAL receiver that could write out normal-looking WAL files for=20 archiving purposes and pass through the WAL stream to a hot=20 standby.=A0 Last I checked (which was admittedly at least a couple=20 years back) there was no such utility, although I seem to remember=20 that Magnus had done some work that looked like it could be bent to=20 that end. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs