problem with archive_command as suggested by documentation

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема problem with archive_command as suggested by documentation
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C202FCC972@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответы Re: problem with archive_command as suggested by documentation  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: problem with archive_command as suggested by documentation  (decibel <decibel@decibel.org>)
Список pgsql-hackers
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".

We ran into (small) problems with an archive_command similar to this
as follows:

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?

Yours,
Laurenz Albe

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Pluggable Indexes (was Re: rmgr hooks (v2))
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Pluggable Indexes