Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T7II5-0002Pm-BV for pgsql-docs@postgresql.org; Fri, 31 Aug 2012 03:53:05 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T7IHz-0004QC-Pl for pgsql-docs@postgresql.org; Fri, 31 Aug 2012 03:53:04 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1T7IHu-0004Y7-7Q; Thu, 30 Aug 2012 23:52:54 -0400 Date: Thu, 30 Aug 2012 23:52:54 -0400 From: Bruce Momjian To: Magnus Hagander Cc: Peter Eisentraut , Josh Kupershmidt , Greg Smith , Euler Taveira de Oliveira , pgsql-docs@postgresql.org Subject: Re: somewhat wrong archive_command example Message-ID: <20120831035254.GK32350@momjian.us> References: <20120816011347.GF8353@momjian.us> <502EA0D0.10004@gmx.net> <20120825230755.GE10814@momjian.us> <20120825234026.GG10814@momjian.us> <1346039025.5873.16.camel@vanquo.pezone.net> <20120827134641.GD11088@momjian.us> <1346291848.17422.11.camel@vanquo.pezone.net> <20120830131101.GK8753@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120830131101.GK8753@momjian.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.1 (--) X-Archive-Number: 201208/58 X-Sequence-Number: 7451 On Thu, Aug 30, 2012 at 09:11:01AM -0400, Bruce Momjian wrote: > On Thu, Aug 30, 2012 at 11:15:30AM +0200, Magnus Hagander wrote: > > On Thu, Aug 30, 2012 at 3:57 AM, Peter Eisentraut wrote: > > > On Mon, 2012-08-27 at 09:46 -0400, Bruce Momjian wrote: > > >> I thought the idea was just to show what a shell script might look like > > >> --- we could say it does the same as a single-line copy, but then people > > >> could improve it, or we could add a comment to show how people could > > >> improve it. > > > > > > Why can't we provide the improved version to begin with, if we know it > > > needs improvement? I think we don't really know what it should look > > > like, do we? > > > > +1. > > > > > > >> > I think what we should do is write a wrapper program in C that covers > > >> > all the bases, support all platforms, and supports a handful of the most > > >> > commonly used copy methods (cp, scp, etc. + compression). Then everyone > > >> > can just use that and doesn't have to figure all these things out from > > >> > scratch every time. > > >> > > >> I doubt it would work because people like the flexibility of shell > > >> scripts. > > > > > > Well, we thought that about the base backup, but now we have > > > pg_basebackup, which supports two output methods that should cover most > > > cases. If we could provide an archive command that has two or three > > > methods, that could also cover most uses. Of course, in either case you > > > are free to write your own script. > > > > I would say the majority of people *don't* like the flexibility of > > shellscripts. They want something simple to use. pg_receivexlog on 9.2 > > is going to help some of them (as a completement to pg_basebackup). > > But also shipping something to use for archive_command that just > > copies the files in a proper way would definitely help for usability. > > > > As long as we keep the write-your-own-script-however-you-like method, > > just like we did for pg_basebackup, doing this can only be an > > improvement. And I don't see anybody suggesting we *remove* this > > capability. > > The original idea for the shell script was just to show people an > example of what it might look like --- not to try to fix or change our > recommended behavior. If there is no interest in showing an example, we > can just close this thread. Patch withdrawn. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +