Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XGxwz-0007RC-C1 for pgsql-docs@arkaria.postgresql.org; Mon, 11 Aug 2014 22:20:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XGxwy-0007Tc-Nt for pgsql-docs@arkaria.postgresql.org; Mon, 11 Aug 2014 22:20:20 +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 1XGxww-0007TB-Qb for pgsql-docs@postgresql.org; Mon, 11 Aug 2014 22:20:18 +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 1XGxwr-0006vp-P2 for pgsql-docs@postgresql.org; Mon, 11 Aug 2014 22:20:17 +0000 Received: from smtp.01.com (smtp.01.com [10.10.0.43]) by mx-out-1.zmailcloud.com (Postfix) with ESMTP id 5B073563D5F; Mon, 11 Aug 2014 17:20:12 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 4F24D602B7; Mon, 11 Aug 2014 17:20:12 -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 5Udx1xkvarEh; Mon, 11 Aug 2014 17:20:12 -0500 (CDT) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 2C34B602D9; Mon, 11 Aug 2014 17:20:12 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 153CE602CE; Mon, 11 Aug 2014 17:20:12 -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 Uim2cCzsYqH0; Mon, 11 Aug 2014 17:20:12 -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 86E71602B7; Mon, 11 Aug 2014 17:20:11 -0500 (CDT) Message-ID: <53E9419A.6010400@agliodbs.com> Date: Mon, 11 Aug 2014 15:20:10 -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: Tom Lane , Kevin Grittner CC: "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> <53E90488.9040103@agliodbs.com> <1407782188.34521.YahooMailNeo@web122305.mail.ne1.yahoo.com> <28492.1407786573@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 12:49 PM, Tom Lane wrote: > Kevin Grittner writes: >> Josh Berkus wrote: >>> Yeah, realistically, I think we need to start supplying a script or two >>> in /contrib and referencing that.=EF=BF=BD I'm not sure how to make it = work for >>> the Windows users though. >=20 >> That might work.=EF=BF=BD We should do something, though.=EF=BF=BD The e= xample we >> give in the docs is not production quality IMO, and is something of >> an embarrassment. >=20 > Well, it's not really intended to be production grade, and I think the > docs say so (perhaps not emphatically enough). Thing is, if we supply a sample command in the docs ... even if it's preceeded by ***DO NOT USE WILL EAT YOUR SERVER*** ... people will still copy-and-paste it, and then put it into production. > The problem with such things as sample scripts is that it might get hard > for people to tell the difference between barnacles (like email ;-)) > and properties that they'd better preserve in any custom script. > The documentation is primarily trying to make the point that the archive > action must not overwrite any existing file (which is such a property) > and that's why it has the test ! -f. It doesn't really address the > question of appropriate error handling, which is what Josh is on about. I'm suggesting that we've established that there is no one-liner which will not cause real problems for users who copy it. Given that, we should not supply a one-liner, even as an example; we should supply some sample scripts, and a reference in the docs: "Please look at /share/archiving-scripts/ for some sample shell scripts for archiving, or use a project like WAL-E, Barman, or OmniPITR." The alternative is to supply a C utility ourselves for log copying, but I think the presence of multiple archiving utilities is a good argument that it's not possible for any given utility to cover more than 30% of use-cases. --=20 Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com --=20 Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs