Re: Replicate only 1 out of 2 databases of Server A to Server B ?

From: Scott Mead <scottm(at)openscg(dot)com>
To: czezz <czezz(at)o2(dot)pl>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Replicate only 1 out of 2 databases of Server A to Server B ?
Date: 2017-04-24 13:55:56
Message-ID: CAKq0gvL9B2zCHsPj8B44hv0=PDVbeckGDnXtkH7xNM4Sjexdvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Apr 24, 2017 at 9:33 AM, czezz <czezz(at)o2(dot)pl> wrote:

> Hi all.
>
> PostgreSQL 9.2.18
> Running on replication mode Master-Slave (async).
> Server A (2 databases) is fully replicated to Server B.
> That works OK.
>
> Question:
> Is it possible to replicate only 1 out of 2 databases of Server A to
> Server B?
>

With 9.2, I think your only real solution is to use logical replication:
bucardo, slony, londiste. These tools require a more involved setup and
configuration than streaming replication (they're not built-in).

For 9.4+ you can use pg_logical. It's 'kind of' built in, you will still
need a separate download and separate configuration flow.

All of the above allow you to select to the object (table, sequence)
level. Just be careful, unlike streaming, there are a lot of caveats. For
example, new tables are not auto-replicated, you cannot ALTER TABLE.

--Scott

> Best regards,
> czezz
>

--
--
Scott Mead
Sr. Architect
*OpenSCG <http://openscg.com>*
http://openscg.com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message John Scalia 2017-04-24 15:02:11 As superuser I still can't update a row in one table
Previous Message David G. Johnston 2017-04-24 13:46:30 Re: Replicate only 1 out of 2 databases of Server A to Server B ?