Re: Understanding streaming replication

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Understanding streaming replication
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C208AF082A@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: Understanding streaming replication  (Philippe Amelant <pamelant@companeo.com>)
Ответы Re: Understanding streaming replication  (Philippe Amelant <pamelant@companeo.com>)
Список pgsql-general
Philippe Amelant wrote:
>>> I'm setting up a 3 nodes cluster and after some tests
>>> I just discover that the cascading slave does not recover.

>> Right, switching timeline over streaming replication
>> is not supported yet.  There's a patch by Heikki in
>> the pipeline for this, so it will probably work in 9.3.
> 
> So if I understand it, I need to rebuild the cascading slave if I
> promote the first standby.
> Is there a way to follow the new master without rebuild ?

>>> As far as I can see in the 9.2 documentation it should work after
>>> an automatic reconnect to the new master.
>> Where did you see that?
> 
> I found this
> 
>     http://www.postgresql.org/docs/9.2/static/warm-standby.html
>     25.2.6. Cascading Replication
>     Promoting a cascading standby terminates the immediate downstream
>     replication connections which it serves. This is because the
>     timeline becomes different between standbys, and they can no longer
>     continue replication. The affected standby(s) may reconnect to
>     reestablish streaming replication.
> 
> 
> So i was thinking it was just a reconnect to the sender (and I can see
> the standby trying to reconnect in the log)

Hmmm.  I think I was too quick when I said no.

If you ship the WAL archives including the "history" file to the
standby, then the standby should be able to recover across the
timeline change from the archives (if you have recovery_target_timeline
set to "latest" in recovery.conf) and then reestablish streaming
replication.

I never tried that though.

(The patch I quoted above would allow the timeline change via
streaming replication.)

Yours,
Laurenz Albe

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

Предыдущее
От: François Beausoleil
Дата:
Сообщение: PG under OpenVZ?
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Out of Shared Memory: max_locks_per_transaction