Re: Use pg_rewind when target timeline was switched

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Use pg_rewind when target timeline was switched
Дата
Msg-id CAB7nPqSsT3zpCimnQUFkOjLr_erPCE4dy7S2Ly8rc-nNKebP-A@mail.gmail.com
обсуждение исходный текст
Ответ на Use pg_rewind when target timeline was switched  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Ответы Re: Use pg_rewind when target timeline was switched  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Список pgsql-hackers
On Mon, Jul 20, 2015 at 9:18 PM, Alexander Korotkov
<a.korotkov@postgrespro.ru> wrote:
> attached patch allows pg_rewind to work when target timeline was switched.
> Actually, this patch fixes TODO from pg_rewind comments.
>
>   /*
>    * Trace the history backwards, until we hit the target timeline.
>    *
>    * TODO: This assumes that there are no timeline switches on the target
>    * cluster after the fork.
>    */
>
> This patch allows pg_rewind to handle data directory synchronization is much
> more general way. For instance, user can return promoted standby to old
> master.

Yes. That would be useful.

> In this patch target timeline history is exposed as global variable. Index
> in target timeline history is used in function interfaces instead of
> specifying TLI directly. Thus, SimpleXLogPageRead() can easily start reading
> XLOGs from next timeline when current timeline ends.

The implementation looks rather neat by having a first look at it, but
the attached patch fails to compile:
pg_rewind.c:488:4: error: use of undeclared identifier 'targetEntry'                       targetEntry =
&targetHistory[i];                      ^
 
Nice to see as well that this has been added to the CF of September.
Regards,
-- 
Michael



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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: pgbench stats per script & other stuff
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: RFC: replace pg_stat_activity.waiting with something more descriptive