Re: [HACKERS] problem with archive_command as suggested by documentation

2009-01-26 Thread David Fetter
On Mon, Jan 26, 2009 at 04:40:12PM +0100, Albe Laurenz wrote: > Peter Eisentraut wrote: > >> I don't think that particular example is a good one since the > >> whole point of the archive is that it should be off-server. If > >> we're going to be exact about the example then we should give a > >> mo

Re: [HACKERS] problem with archive_command as suggested by documentation

2009-01-26 Thread Albe Laurenz
Peter Eisentraut wrote: >> I don't think that particular example is a good one since the whole >> point of the archive is that it should be off-server. If we're going to >> be exact about the example then we should give a more realistic one, >> like using scp. Unfortunately, there is no secure-remo

Re: [HACKERS] problem with archive_command as suggested by documentation

2009-01-26 Thread Peter Eisentraut
Simon Riggs wrote: I don't think that particular example is a good one since the whole point of the archive is that it should be off-server. If we're going to be exact about the example then we should give a more realistic one, like using scp. Unfortunately, there is no secure-remote-move command

Re: [HACKERS] problem with archive_command as suggested by documentation

2009-01-23 Thread Tom Lane
"Albe Laurenz" writes: > Heikki Linnakangas wrote: >> Well, the documentation states the reason to do that: >> >> This is an important safety feature to preserve the >> integrity of your archive in case of administrator error >> (such as sending the output of two different servers to the >> sa

Re: [HACKERS] problem with archive_command as suggested by documentation

2009-01-23 Thread Simon Riggs
On Fri, 2009-01-23 at 08:20 +0100, Albe Laurenz wrote: > > Perhaps it should suggest > > something like: > > > > test ! -f .../%f && cp %p .../%f.tmp && mv .../%f.tmp .../%f > > > > ie. copy under a different filename first, and rename the file in place > > after it's completely written, assu

Re: [HACKERS] problem with archive_command as suggested by documentation

2009-01-22 Thread Albe Laurenz
Heikki Linnakangas wrote: > > The documentation states > > > > "The archive command should generally be designed to refuse to overwrite > > any pre-existing archive file." > > > > and suggests an archive_command like "test ! -f .../%f && cp %p .../%f". > > > > We ran into (small) problems with

Re: [HACKERS] problem with archive_command as suggested by documentation

2009-01-22 Thread decibel
On Jan 22, 2009, at 10:18 AM, Albe Laurenz wrote: "The archive command should generally be designed to refuse to overwrite any pre-existing archive file." ... The server received a fast shutdown request while a WAL segment was being archived. The archiver stopped and left behind a half-writt

Re: [HACKERS] problem with archive_command as suggested by documentation

2009-01-22 Thread Heikki Linnakangas
Albe Laurenz wrote: The documentation states in http://www.postgresql.org/docs/current/static/continuous-archiving.html#BACKUP-ARCHIVING-WAL "The archive command should generally be designed to refuse to overwrite any pre-existing archive file." and suggests an archive_command like "test ! -f

[HACKERS] problem with archive_command as suggested by documentation

2009-01-22 Thread Albe Laurenz
The documentation states in http://www.postgresql.org/docs/current/static/continuous-archiving.html#BACKUP-ARCHIVING-WAL "The archive command should generally be designed to refuse to overwrite any pre-existing archive file." and suggests an archive_command like "test ! -f .../%f && cp %p .../%f