Re: Immediate standby promotion

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Immediate standby promotion
Дата
Msg-id CA+Tgmoa5JU_UU3v7T_aTvgLSvrOHFgUsqaVpUixMAG1MzJ5X5A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Immediate standby promotion  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On Mon, Sep 1, 2014 at 7:14 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
>> I think there is one downside as well for this proposal that
>> apart from data loss, it can lead to uncommitted data occupying
>> space in database which needs to be later cleaned by vacuum.
>> This can happen with non-immediate promote as well, but the
>> chances with immediate are more.  So the gain we got by doing
>> immediate promotion can lead to slow down of operations in some
>> cases.  It might be useful if we mention this in docs.
>
> Yep, the immediate promotion might be more likely to cause
> the recovery to end before replaying WAL data of VACUUM. But, OTOH,
> I think that the immediate promotion might be more likely to cause
> the recovery to end before replaying WAL data which will generate
> garbage data. So I'm not sure if it's worth adding that note to the doc.

-1 for documenting that.  This is mostly a general PostgreSQL
phenomenon and has little to do with immediate promotion specifically.
I think anything we write here is likely to be more confusing than
helpful.

> Agreed. So I'm thinking to change the code as follows.
>
> if (immediate_promote)
>         ereport(LOG, (errmsg("received immediate promote request")));
> else
>         ereport(LOG, (errmsg("received promote request")));

+1 for that version.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: pgcrypto: PGP armor headers