Re: problem with archive_command as suggested by documentation

From: decibel <decibel(at)decibel(dot)org>
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: problem with archive_command as suggested by documentation
Date: 2009-01-22 18:16:39
Message-ID: F80627C8-95BD-4EA3-988A-ABFB17F1536C@decibel.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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-written archive file.
>
> Now when the server was restarted, the archiver tried to archive
> the same
> WAL segment again and got an error because the destination file
> already
> existed.
>
> That means that WAL archiving is stuck until somebody manually removes
> the partial archived file.
>
>
> I suggest that the documentation be changed so that it does not
> recommend this setup. WAL segment names are unique anyway.
>
> What is your opinion? Is the problem I encountered a corner case
> that should be ignored?

The test is recommended because if you accidentally set two different
clusters to archive to the same location you'll trash everything. I
don't know of a good work-around; IIRC we used to leave the archive
command to complete, but that could seriously delay shutdown so it
was changed. I don't think we created an option to control that
behavior.
--
Decibel!, aka Jim C. Nasby, Database Architect decibel(at)decibel(dot)org
Give your computer some brain candy! www.distributed.net Team #1828

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2009-01-22 18:36:06 Re: problem with archive_command as suggested by documentation
Previous Message decibel 2009-01-22 18:16:36 Re: deductive databases in postgreSQL