Re: Streaming replication issue

From: John Wiencek <jwiencek3(at)comcast(dot)net>
To: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
Cc: mallikarjun t <mallit333(at)gmail(dot)com>, Luca Ferrari <fluca1978(at)gmail(dot)com>, soumitra bhandary <soumitra(dot)bhandary(at)hotmail(dot)com>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Streaming replication issue
Date: 2019-09-05 16:23:51
Message-ID: E6DF68FC-0222-49A7-8D35-547531224D61@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Multi master requires that you identify one node as the primary node. Data is populated to the remote node via an initial snapshot. Tables on the remote node cannot exist when you run the initial snapshot. The snapshot will create all objects on the remote node .

xDB(multi-master replication) will not merge two databases together.

Sent from my iPad

> On Sep 5, 2019, at 11:08 AM, Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com> wrote:
>
>> On Thu, Sep 5, 2019 at 5:54 PM John Wiencek <jwiencek3(at)comcast(dot)net> wrote:
>>
>> H
>>
>> When you set up streaming replication your read-only replica should be created using pg_basebackup.
>>
>> for example;
>>
>> Run this from the streamed/slave server. Set variable $PGDATA. Make sure directory structure exits and is empty( no file in $PGDATA on slave server)
>>
>> pg_basebackup --pgdata=$PGDATA --label=standby --host 10.64.98.199--usernamerepuser --wal-method=stream --write-recovery-conf.
>>
>>
>> Your PGDATA direetory on the streamed/salve server needs to be empty. The basebackup will copy ALL files from the master to the slave. This would include PostgreSQL.conf , pg_hba.conf and all associated files for the databases.
>>
>> Therefore the streaming/slave server will be EXACTLY the same as the master. Same users, same port, same data.
>>
>
> I am under impression that what you are trying to do is merging two
> Primary databases. If that is what you actually want then Streaming
> Replication is not going to work for you. Maybe you should look for
> some Multi-master replication tool, which is probably the way to go if
> you want to mix PostgreSQL and EDB Advanced Server anyway.
>
> Regards,
>
> Juan José Santamaría Flecha

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Juan José Santamaría Flecha 2019-09-05 17:51:37 Re: Streaming replication issue
Previous Message Juan José Santamaría Flecha 2019-09-05 16:08:39 Re: Streaming replication issue