master and slave at same time

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

master and slave at same time

Yambu
Hello

Is it possible to make one server act as master and as a slave at the same time?

This will mean writes are permitted on it.

regards
Reply | Threaded
Open this post in threaded view
|

Re: master and slave at same time

Atul Kumar-2
You can use 2 different ports and create 2 instances.

One can act as master and another as slave.

But slave never allow write operation on itself.

If you want both servers to accept write transaction then you should use BDR (postgres) or MMR (Enterprisedb).



Regards 
Atul





On Wednesday, January 6, 2021, Yambu <[hidden email]> wrote:
Hello

Is it possible to make one server act as master and as a slave at the same time?

This will mean writes are permitted on it.

regards
Reply | Threaded
Open this post in threaded view
|

Re: master and slave at same time

Yambu
If i use logical replication , can i not make it work?

On Wed, Jan 6, 2021 at 3:27 PM Atul Kumar <[hidden email]> wrote:
You can use 2 different ports and create 2 instances.

One can act as master and another as slave.

But slave never allow write operation on itself.

If you want both servers to accept write transaction then you should use BDR (postgres) or MMR (Enterprisedb).



Regards 
Atul





On Wednesday, January 6, 2021, Yambu <[hidden email]> wrote:
Hello

Is it possible to make one server act as master and as a slave at the same time?

This will mean writes are permitted on it.

regards
Reply | Threaded
Open this post in threaded view
|

Re: master and slave at same time

Michael Banck-2
On Wed, Jan 06, 2021 at 03:31:32PM +0200, Yambu wrote:
> If i use logical replication , can i not make it work?

Well yes, you can write to the subscriber if you use logical
replication.

However, there are severe drawbacks in this, e.g. you will have to
resolve conflicts yourself, DDL isn't possible unless you do it
manually, sequences are not replicated etc. pp.

Logical replication for itself is not a general HA tool for Postgres
right now but if implemented carefully can be used for some use cases
like merging several databases into a data warehouse or carefully only
changing data locally.


Michael

--
Michael Banck
Projektleiter / Senior Berater
Tel.: +49 2166 9901-171
Fax:  +49 2166 9901-100
Email: [hidden email]

credativ GmbH, HRB Mönchengladbach 12080
USt-ID-Nummer: DE204566209
Trompeterallee 108, 41189 Mönchengladbach
Geschäftsführung: Dr. Michael Meskes, Jörg Folz, Sascha Heuer

Unser Umgang mit personenbezogenen Daten unterliegt
folgenden Bestimmungen: https://www.credativ.de/datenschutz