Re: Load Distributed Checkpoints, take 3

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Load Distributed Checkpoints, take 3
Дата
Msg-id 4680CE4A.3080906@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Load Distributed Checkpoints, take 3  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Load Distributed Checkpoints, take 3  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Tom Lane wrote:
> Hmm.  But if we're going to do that, we might as well have a checkpoint
> for our troubles, no?  The reason for the current design is the
> assumption that a bgwriter_all scan is less burdensome than a
> checkpoint, but that is no longer true given this rewrite.

Per comments in CreateCheckPoint, another  also skip the extra
checkpoints to avoid writing two checkpoints to the same page, risking
losing both on a crash:

>      * If this isn't a shutdown or forced checkpoint, and we have not inserted
>      * any XLOG records since the start of the last checkpoint, skip the
>      * checkpoint.    The idea here is to avoid inserting duplicate checkpoints
>      * when the system is idle. That wastes log space, and more importantly it
>      * exposes us to possible loss of both current and previous checkpoint
>      * records if the machine crashes just as we're writing the update.
>      * (Perhaps it'd make even more sense to checkpoint only when the previous
>      * checkpoint record is in a different xlog page?)

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: remove unused "caller" arg from stringToQualifiedNameList
Следующее
От: ITAGAKI Takahiro
Дата:
Сообщение: pgstat_drop_relation bugfix