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 AANLkTikFEmq3KVtwUXjWKhjObo6NrN+oTLc_LDVmssbG@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_archivecleanup should remove WAL files also in pg_xlog?  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.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 5:01 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> If the only consequence is that you get some extra WAL files in the archive,
> until pg_archivecleanup runs again, I think we can just live with it.

We might get some extra WAL files also in pg_xlog. Because the WAL
files which don't have .ready/.done file survive two checkpoints after
failover. IOW, though first checkpoint right after failover should remove
those WAL files, they cannot be removed since they don't have .done
file. Then the first checkpoint creates .ready files for them, the archiver
performs bulk-archiving (this would be harm in performance if there
are many such WAL files), and the subsequent checkpoint removes
them.

> But
> don't you have bigger problems when standby tries to archive a file that
> already exists in the archive, because master already archived it? We advise
> to write archive_command so that it fails if the file exists already.

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.

Regards,

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


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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Instrument checkpoint sync calls
Следующее
От: Dmitriy Igrishin
Дата:
Сообщение: Re: hstores in pl/python