Re: Steps to switch from Master to standby mode :

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: Steps to switch from Master to standby mode :
Дата
Msg-id CA+HiwqEqOxvE9Ur-+_oAMx4dSoVBO_qNhm0-LzBjwHYHzRbsQg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Steps to switch from Master to standby mode :  (prakhar jauhari <prak840@gmail.com>)
Ответы Re: Steps to switch from Master to standby mode :  (prakhar jauhari <prak840@gmail.com>)
Список pgsql-admin
On Wed, May 15, 2013 at 3:12 PM, prakhar jauhari <prak840@gmail.com> wrote:
> So to allow a standby to recover WAL files that are missing (using archives
> or directly copying wall from the new master to the new standby) in order to
> complete the timeline change, is a wrong approach, I mean is this not safe
> in term of data not being corrupted? Because i tried this and this seems to
> change the timeline on the new standby. For this i added following to my
> recovery file:
>
> restore_command = 'cp <pg_data_dir>/archivedir/%f %p'
> recovery_target_timeline = 'latest'
>
> regards,
> Prakhar.

Hello Prakhar,

Before PostgreSQL 9.3, to switch over from the old master to new
standby (the case in which it failed due to timeline mismatch), you
need to do what you have mentioned you did. The new standby would be
able to transition from old timeline to the new one (in fact the
newest/latest) using timeline history file that is present in the
archive which is updated by the new master to specify at what point in
WAL it branched off from the old timeline to the new timeline. The new
standby is able to follow that information to arrive at a consistent
state. Do try this and report errors if you find any.

Though, you would want to switch to 9.3 to do such things without a
WAL archive.

--
Amit Langote


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

Предыдущее
От: Armand du Plessis
Дата:
Сообщение: Re: Transaction ID wrap limit is log entries
Следующее
От: Samuel Stearns
Дата:
Сообщение: Update pg_type possible problems