pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedmaster and slave at same time
4+ messages / 3 participants
[nested] [flat]
* master and slave at same time
@ 2021-01-06 13:17 Yambu <hyambu@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Yambu @ 2021-01-06 13:17 UTC (permalink / raw)
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: master and slave at same time
@ 2021-01-06 13:27 Atul Kumar <akumar14871@gmail.com>
parent: Yambu <hyambu@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Atul Kumar @ 2021-01-06 13:27 UTC (permalink / raw)
To: Yambu <hyambu@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
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 <hyambu@gmail.com> 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
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: master and slave at same time
@ 2021-01-06 13:31 Yambu <hyambu@gmail.com>
parent: Atul Kumar <akumar14871@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Yambu @ 2021-01-06 13:31 UTC (permalink / raw)
To: Atul Kumar <akumar14871@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
If i use logical replication , can i not make it work?
On Wed, Jan 6, 2021 at 3:27 PM Atul Kumar <akumar14871@gmail.com> 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 <hyambu@gmail.com> 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
>>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: master and slave at same time
@ 2021-01-06 13:36 Michael Banck <michael.banck@credativ.de>
parent: Yambu <hyambu@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Michael Banck @ 2021-01-06 13:36 UTC (permalink / raw)
To: Yambu <hyambu@gmail.com>; +Cc: Atul Kumar <akumar14871@gmail.com>; Pgsql-admin <pgsql-admin@lists.postgresql.org>
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: michael.banck@credativ.de
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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2021-01-06 13:36 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06 13:17 master and slave at same time Yambu <hyambu@gmail.com>
2021-01-06 13:27 ` Atul Kumar <akumar14871@gmail.com>
2021-01-06 13:31 ` Yambu <hyambu@gmail.com>
2021-01-06 13:36 ` Michael Banck <michael.banck@credativ.de>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox