Re: PostgreSQL Replication

Поиск
Список
Период
Сортировка
От Thomas Guyot
Тема Re: PostgreSQL Replication
Дата
Msg-id f397ef78-9a37-859b-ada3-ac9b8fac3e33@gmail.com
обсуждение исходный текст
Ответ на Re: PostgreSQL Replication  (Mutuku Ndeti <jnmutuku@gmail.com>)
Список pgsql-general
On 2021-02-17 04:22, Mutuku Ndeti wrote:
> Thank you. 
> 
> I agree with you. Single master, with a standby replica, seems easier to
> manage. Is there a way to automatically promote the standby, when the
> active master fails? Is it feasible to have 2 instances of the
> application, writing onto the same DB, reason for two instances of the
> application is to allow for redundancy/load balancing. 
> 

Again, not being PostgreSQL-specific, it is possible to have an
active/standby master node with shared storage (ex fibrechannel,
iscsi... it can only be mounted on only one node at any given time and
it's the cluster's responsibility to ensure the other node has unmounted
properly). This is ideal when dealing with fully redundant storage
arrays, and fairly simple to setup on the cluster side. Attaching
additional slaves to an active/standby cluster is also usually simpler
since there is just one server/replication log.

Another solution is to have a replication ring (ex. A replicates to B, B
replicates to A). With such setup it is very important writes only ever
happen on a single node, and is easiest to do so by using a floating IP
that can only be reached from one node at any given time (again it's the
cluster's responsibility to ensure the floating IP is never on both).
This method may require a more complex configuration to ensure updates
are consistent and to keep additional slaves synchronized to the
cluster. Also since both servers have a permanent IP it is important to
ensure no updates are made directly to them. The warm side can still be
used for read-only access though (with a very small lag).

In either case, there is likely some configuration needed. This page
seems to list a few projects that may make your cluster setup much easier:

https://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Pooling

Regards,

--
Thomas



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

Предыдущее
От: Mutuku Ndeti
Дата:
Сообщение: Re: PostgreSQL Replication
Следующее
От: Alexander Farber
Дата:
Сообщение: Re: How to return a jsonb list of lists (with integers)