Re: [EXTERNAL] RE: PostgreSQL-12 replication. Check replication lag

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [EXTERNAL] RE: PostgreSQL-12 replication. Check replication lag
Дата
Msg-id 20200806023942.GB16470@paquier.xyz
обсуждение исходный текст
Ответ на Re: [EXTERNAL] RE: PostgreSQL-12 replication. Check replication lag  (Mariya Rampurawala <Mariya.Rampurawala@veritas.com>)
Список pgsql-general
On Wed, Aug 05, 2020 at 06:36:15PM +0000, Mariya Rampurawala wrote:
> What I want to understand is that, in case of replication link
> failure, there will still be inserts happening at the master
> node. In that case, how will the slave know if it is up-to-date?

It cannot do that by itself, which is why in common HA scenarios you
have a witness host that acts as a monitoring instance for the primary
and the standby so as you limit SPOF issues.  This depends of course
on your application requirements, but you can also leverage things
by using a replication lag in bytes on the primary, and even couple
that with synchronous replication to check when commits are getting
blocked.

IMO, I think that you should try to not reinvent the wheel and use one
of the solutions provided by the community, pg_auto_failover coming
into my mind as one solution for example.
--
Michael

Вложения

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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: Check replication lag
Следующее
От: David Gauthier
Дата:
Сообщение: Can PAF be used to provide zero downtime while primary and backup servers are being patched?