Re: [9.3 bug] disk space in pg_xlog increases during archive recovery

Поиск
Список
Период
Сортировка
От MauMau
Тема Re: [9.3 bug] disk space in pg_xlog increases during archive recovery
Дата
Msg-id 6C3928218D9B400EAD5A86BB86B56999@maumau
обсуждение исходный текст
Ответ на Re: [9.3 bug] disk space in pg_xlog increases during archive recovery  (Jeff Janes <jeff.janes@gmail.com>)
Ответы Re: [9.3 bug] disk space in pg_xlog increases during archive recovery
Список pgsql-hackers
Hi, Fujii san,

> On Wed, Aug 7, 2013 at 7:03 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> On second thought, probably we cannot remove the restored WAL files early
>> because they might be required for fast promotion which is new feature in
>> 9.3.
>> In fast promotion, an end-of-recovery checkpoint is not executed. After
>> the end
>> of recovery, normal online checkpoint starts. If the server crashes
>> before such
>> an online checkpoint completes, the server needs to replay again all the
>> WAL
>> files which it replayed before the promotion. Since this is the crash
>> recovery,
>> all those WAL files need to exist in pg_xlog directory. So if we remove
>> the
>> restored WAL file from pg_xlog early, such a crash recovery might fail.
>>
>> So even if cascade replication is disabled, if standby_mode = on, i.e.,
>> fast
>> promotion can be performed, we cannot remove the restored WAL files
>> early.

Following Fujii-san's advice, I've made the attached patch.  This prevents
unnecessary WAL accumulation in pg_xlog/ during archive recovery (not
standby recovery).  To do this, I had to revive some code in
exitArchiveRecovery() from 9.1.

Could you commit this to 9.2 and later?


Regards
MauMau

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Negative Transition Aggregate Functions (WIP)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Useless "Replica Identity: NOTHING" noise from psql \d