Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments
Дата
Msg-id CAHGQGwFy4QFrBuMNk3VHM+X+PRtm_T3p-yzP2z8yNCH--QD4Uw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Re: [BUG] Checkpointer on hot standby runs without looking checkpoint_segments  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
On Thu, Apr 19, 2012 at 2:20 PM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> Hello, this is new version of standby checkpoint_segments patch.

Thanks for the patch!

>  - xlog.c: Make StandbyMode shared.
>
>  - checkpointer.c: Use IsStandbyMode() to check if postmaster is
>   under standby mode.

IsStandbyMode() looks overkill to me. The standby mode flag is forcibly
turned off at the end of recovery, but its change doesn't need to be shared
to the checkpointer process, IOW, the shared flag doesn't need to change
since startup like XLogCtl->archiveCleanupCommand, I think. So we can
simplify the code to share the flag to the checkpointer. See the attached
patch (though not tested yet).

The comments in checkpointer.c seems to need to be revised more. For
example,

+     * XLogInsert that actually triggers a checkpoint when

Currently a checkpoint is triggered by XLogWrite (not XLogInsert), the above
needs to be corrected.

Regards,

--
Fujii Masao

Вложения

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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: 9.3: summary of corruption detection / checksums / CRCs discussion
Следующее
От: Jan Urbański
Дата:
Сообщение: Re: plpython triggers are broken for composite-type columns