Re: pg_archivecleanup should remove WAL files also in pg_xlog?

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: pg_archivecleanup should remove WAL files also in pg_xlog?
Дата
Msg-id AANLkTinVmiPifZdQzmrDRqpEAtVkJkChXLSoSB4886DG@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_archivecleanup should remove WAL files also in pg_xlog?  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On Mon, Dec 13, 2010 at 6:02 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
> Yep, that's recommended in the document, but I don't want to use that.
> Because that might make new master fail to archive WAL file because of
> existence of half-baked file in the archive, after failover. This can happen
> if the master crashes while its archiver is copying WAL file.

This occurred to me that archive_command should check the size of the
existing archived WAL file, and overwrite it with new file when the size is
not equal to 16MB. Of course, if backup history file or timeline history file
is given, it should not take account of the file size.

I implemented pg_archivecopy module to do the above.
git://git.postgresql.org/git/users/fujii/postgres.git
branch: pg_archivecopy

If it's worth, I'll release it in pgFoundry or elsewhere.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: hstores in pl/python
Следующее
От: Shigeru HANADA
Дата:
Сообщение: Re: SQL/MED - core functionality