Re: Issues with Quorum Commit

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Issues with Quorum Commit
Дата
Msg-id AANLkTimGC3i2=dge3EA3cZiNv_yHf3GHz7VtUqPOB7T_@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Issues with Quorum Commit  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Issues with Quorum Commit  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Wed, Oct 13, 2010 at 3:50 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> There's another problem here we should think about, too.  Suppose you
> have a master and two standbys.  The master dies.  You promote one of
> the standbys, which turns out to be behind the other.  You then
> repoint the other standby at the one you promoted.  Congratulations,
> your database is now very possible corrupt, and you may very well get
> no warning of that fact.  It seems to me that we would be well-advised
> to install some kind of bullet-proof safeguard against this kind of
> problem, so that you will KNOW that the standby needs to be re-synced.

Yep. This is why I said it's not easy to implement that.

To start the standby without taking a base backup from new master after
failover, the user basically has to promote the standby which is ahead
of the other standbys (e.g., by comparing pg_last_xlog_replay_location
on each standby).

As the safeguard, we seem to need to compare the location at the switch
of the timeline on the master with the last replay location on the standby.
If the latter location is ahead AND the timeline ID of the standby is not
the same as that of the master, we should emit warning and terminate the
replication connection.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Issues with Quorum Commit
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: wip: functions median and percentile