Both type of replications from a single server?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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.
Reply | Threaded
Open this post in threaded view
|

Re: Both type of replications from a single server?

Michael Paquier-2
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

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Both type of replications from a single server?

Srinivasa T N
On Thu, Oct 8, 2020 at 12:19 PM Michael Paquier <[hidden email]> 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. 
Reply | Threaded
Open this post in threaded view
|

Re: Both type of replications from a single server?

Srinivasa T N


On Thu, Oct 8, 2020 at 12:50 PM Srinivasa T N <[hidden email]> wrote:
On Thu, Oct 8, 2020 at 12:19 PM Michael Paquier <[hidden email]> 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.
Reply | Threaded
Open this post in threaded view
|

Re: Both type of replications from a single server?

Michael Paquier-2
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

signature.asc (849 bytes) Download Attachment