Re: Warm-standby robustness question

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Warm-standby robustness question
Дата
Msg-id 3149.1198004157@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Warm-standby robustness question  ("David F. Skoll" <dfs@roaringpenguin.com>)
Ответы Re: Warm-standby robustness question  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Список pgsql-admin
"David F. Skoll" <dfs@roaringpenguin.com> writes:
> My question is this:  If the master database is fairly busy, gets
> VACUUMed once a day, etc. can we expect the warm standby server
> to work correctly after days/weeks/months/years of log shipping,
> or should we periodically take new base backups?

I don't think the time period is at issue.  Log-shipping should keep the
slave a perfect replica of the master (if it doesn't, we have problems
anyway).  The operational question you need to ask yourself is: if
you haven't swapped to the slave lately, how do you know it will work
when you need it to?

The current backup/restore docs suggest as best practice that you
intentionally swap master and slave periodically, ie, fail over
to the slave and then re-initialize the master as a new slave.
This provides a periodic test that your fail-over mechanisms actually
work, and as a bonus gives you a chance for a maintenance window
on the ex-master before it's brought up as new slave.

            regards, tom lane

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

Предыдущее
От: "David F. Skoll"
Дата:
Сообщение: Warm-standby robustness question
Следующее
От: Deron
Дата:
Сообщение: Set maintenance work mem for pg_restore