Skip site navigation (1) Skip section navigation (2)

Re: postgresql.conf archive_command example

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Dimitri Fontaine" <dimitri(at)2ndQuadrant(dot)fr>, "Robert Haas" <robertmhaas(at)gmail(dot)com>
Cc: "Josh Berkus" <josh(at)agliodbs(dot)com>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: postgresql.conf archive_command example
Date: 2011-09-02 14:34:34
Message-ID: 4E60A32A0200002500040B1C@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-hackers
Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> I'm also wondering if providing some shell script examples of a
>>> fault-tolerant script to handle archiving would be useful.
>>
>> I think it would.
> 
> My usual advice is to avoid having to write one if possible,
> because it's more complex than it looks.  What about recommending
> existing solutions, such as walmgr from Skytools?
> 
> Even better, what about including a default archiving tool, that
> could be either another script in bin/ or rather an internal
> command. The default would accept a location as argument, for
> simple needs you mount a remote filesystem and there you go.  If
> you need something more complex, you still can provide it
> yourself.
 
In a green field I might argue for having an archvie_directory GUC
instead of archive_command.  As it stands, it might be a really good
idea to provide a pg_archiveto executable which takes as arguments a
directory path and the arguments passed to the archive script.  With
a little extra effort, the executable could check for some file
which would specify what host and path should be writing archives
there, to avoid problems with copied database directories
accidentally writing to the same location as the source.
 
Such an executable seems like minimal effort compared to the
problems it would solve.
 
If there's an existing tool with appropriate licensing which is
sufficiently portable and reliable, all the better -- let's ship it
and use that for our example archive_command.
 
-Kevin

In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2011-09-02 14:36:01
Subject: Re: pg_upgrade automatic testing
Previous:From: Tom LaneDate: 2011-09-02 14:13:19
Subject: Re: PATCH: regular logging of checkpoint progress

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group