The way to know whether the standby has caught up with the master

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема The way to know whether the standby has caught up with the master
Дата
Msg-id BANLkTimx7fJXT=UhUnc1NjDBsKt-Njy-7A@mail.gmail.com
обсуждение исходный текст
Ответы Re: The way to know whether the standby has caught up with the master
Список pgsql-hackers
Hi,

For reliable high-availability, when the master crashes, the clusterware must
know whether it can promote the standby safely without any data loss,
before actually promoting it. IOW, it must know whether the standby has
already caught up with the primary. Otherwise, failover might cause data loss.
We can know that from pg_stat_replication on the master. But the problem
is that pg_stat_replication is not available since the master is not running at
that moment. So that info should be available also on the standby.

To achieve that, I'm thinking to change walsender so that, when the standby
has caught up with the master, it sends back the message indicating that to
the standby. And I'm thinking to add new function (or view like
pg_stat_replication)
available on the standby, which shows that info.

Thought?

Regards,

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


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: tackling full page writes
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: The way to know whether the standby has caught up with the master