Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 972ED63578D for ; Mon, 12 Apr 2010 19:24:54 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 13918-02-4 for ; Mon, 12 Apr 2010 22:24:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 4342F6356CA for ; Mon, 12 Apr 2010 19:06:03 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id o3CM5vc27021; Mon, 12 Apr 2010 18:05:57 -0400 (EDT) From: Bruce Momjian Message-Id: <201004122205.o3CM5vc27021@momjian.us> Subject: Re: confusing archive_command example In-Reply-To: <4BB48EE1.2050303@2ndquadrant.com> To: Greg Smith Date: Mon, 12 Apr 2010 18:05:56 -0400 (EDT) CC: Peter Eisentraut , Tom Lane , Josh Kupershmidt , pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ELM1271109956-26874-0_" Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/45 X-Sequence-Number: 5444 --ELM1271109956-26874-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" Greg Smith wrote: > The third issue here, not mentioned yet, is that there's also an example > of setting up archive_command in its GUC documentation: > > http://developer.postgresql.org/pgdocs/postgres/runtime-config-wal.html > > This has drifted out of sync with the section being updated here this > week--its archive_command example isn't even using "-i". I think the > right thing to do here is to migrate the Windows example out of 18.5.3 > from 24.3.1, then replace the existing examples in 18.5.3 to instead > suggest 24.3.1 has them. Given that all of this documentation giving > examples for how to correctly configure that parameter, like this cp > trivia, only appears in the PITR docs section, I don't see any reason to > duplicate that in the GUC area. Having the second, minimally documented > version of those in 18.5.3 just encourages people to use what we know is > a bad practice by providing them as examples. Agreed. The attached applied patch removes the example from the configure section. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com --ELM1271109956-26874-0_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" Index: doc/src/sgml/config.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/config.sgml,v retrieving revision 1.262 diff -c -c -r1.262 config.sgml *** doc/src/sgml/config.sgml 3 Apr 2010 07:22:53 -0000 1.262 --- doc/src/sgml/config.sgml 12 Apr 2010 21:59:26 -0000 *************** *** 1721,1728 **** (The path name is relative to the working directory of the server, i.e., the cluster's data directory.) Use %% to embed an actual % character in the ! command. For more information see . This parameter can only be set in the postgresql.conf file or on the server command line. It is ignored unless archive_mode was enabled at server start. --- 1721,1731 ---- (The path name is relative to the working directory of the server, i.e., the cluster's data directory.) Use %% to embed an actual % character in the ! command. It is important for the command to return a zero ! exit status only if it succeeds. For more information see ! . ! ! This parameter can only be set in the postgresql.conf file or on the server command line. It is ignored unless archive_mode was enabled at server start. *************** *** 1735,1748 **** archiving, but also breaks the chain of WAL files needed for archive recovery, so it should only be used in unusual circumstances. - - It is important for the command to return a zero exit status if - and only if it succeeds. Examples: - - archive_command = 'cp "%p" /mnt/server/archivedir/"%f"' - archive_command = 'copy "%p" "C:\\server\\archivedir\\%f"' # Windows - - --- 1738,1743 ---- --ELM1271109956-26874-0_--