Обсуждение: Both type of replications from a single server?

Поиск
Список
Период
Сортировка

Both type of replications from a single server?

От
Srinivasa T N
Дата:
Hi All,
   Is it possible to have both type of replications (streaming and logical) from a single server?
   If I have 3 servers A,B and C, then I want to have streaming replication from A to B whereas logical replication from A to C.  Is it possible?

Regards,
Seenu.

Re: Both type of replications from a single server?

От
Michael Paquier
Дата:
On Thu, Oct 08, 2020 at 11:43:26AM +0530, Srinivasa T N wrote:
>    Is it possible to have both type of replications (streaming and logical)
> from a single server?

Yes.

>    If I have 3 servers A,B and C, then I want to have streaming replication
> from A to B whereas logical replication from A to C.  Is it possible?

And yes.
--
Michael

Вложения

Re: Both type of replications from a single server?

От
Srinivasa T N
Дата:
On Thu, Oct 8, 2020 at 12:19 PM Michael Paquier <michael@paquier.xyz> wrote:
On Thu, Oct 08, 2020 at 11:43:26AM +0530, Srinivasa T N wrote:
>    Is it possible to have both type of replications (streaming and logical)
> from a single server?

Yes.

>    If I have 3 servers A,B and C, then I want to have streaming replication
> from A to B whereas logical replication from A to C.  Is it possible?

And yes.
My next question is "Are there any setup instructions available for the same"?

Regards,
Seenu. 

Re: Both type of replications from a single server?

От
Srinivasa T N
Дата:


On Thu, Oct 8, 2020 at 12:50 PM Srinivasa T N <seenutn@gmail.com> wrote:
On Thu, Oct 8, 2020 at 12:19 PM Michael Paquier <michael@paquier.xyz> wrote:
On Thu, Oct 08, 2020 at 11:43:26AM +0530, Srinivasa T N wrote:
>    Is it possible to have both type of replications (streaming and logical)
> from a single server?

Yes.

>    If I have 3 servers A,B and C, then I want to have streaming replication
> from A to B whereas logical replication from A to C.  Is it possible?

And yes.
My next question is "Are there any setup instructions available for the same"?
 
For streaming replication, I need to set wal_level to replica in A whereas for logical_replication we need to set wal_level to replica in the same A server.  So, was wondering how to go about?

Regards,
Seenu.

Re: Both type of replications from a single server?

От
Michael Paquier
Дата:
On Thu, Oct 08, 2020 at 01:25:14PM +0530, Srinivasa T N wrote:
> For streaming replication, I need to set wal_level to replica in A whereas
> for logical_replication we need to set wal_level to replica in the same A
> server.  So, was wondering how to go about?

A logical replica needs wal_level = logical, a setting that also
allows to do streaming replication for a physical replica.  But the
opposite is not true, as using wal_level = replica will not work for
logical replicas.  So, assuming that you want to have both logical and
physical replicas that replicate from the same source server, you need
to set wal_level to logical on the primary server because it is a
system-wide configuration.
--
Michael

Вложения