Re: problem with archive_command as suggested by documentation - Mailing list pgsql-hackers

From decibel
Subject Re: problem with archive_command as suggested by documentation
Date
Msg-id F80627C8-95BD-4EA3-988A-ABFB17F1536C@decibel.org
Whole thread Raw
In response to problem with archive_command as suggested by documentation  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List 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@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828




pgsql-hackers by date:

Previous
From: decibel
Date:
Subject: Re: deductive databases in postgreSQL
Next
From: "Albe Laurenz"
Date:
Subject: Re: problem with archive_command as suggested by documentation