pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed Replicate only 1 out of 2 databases of Server A to Server B ?
4+ messages / 4 participants
[nested] [flat]
* Replicate only 1 out of 2 databases of Server A to Server B ?
@ 2017-04-24 13:33 czezz <czezz@o2.pl>
0 siblings, 3 replies; 4+ messages in thread
From: czezz @ 2017-04-24 13:33 UTC (permalink / raw)
To: pgsql-admin
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? Best regards, czezz
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Replicate only 1 out of 2 databases of Server A to Server B ?
@ 2017-04-24 13:45 John Scalia <jayknowsunix@gmail.com>
parent: czezz <czezz@o2.pl>
2 siblings, 0 replies; 4+ messages in thread
From: John Scalia @ 2017-04-24 13:45 UTC (permalink / raw)
To: czezz <czezz@o2.pl>; +Cc: pgsql-admin
Yes, that is possible through PostgreSQL's logical replication system. It
sounds like, however, you're using streaming replication and that cannot
replicate just one database from the master cluster. So, you'll have to
change your mechanism. Suggest you look at configuring logical replication.
--
Jay
On Mon, Apr 24, 2017 at 9:33 AM, czezz <czezz@o2.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?
>
> Best regards,
> czezz
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Replicate only 1 out of 2 databases of Server A to Server B ?
@ 2017-04-24 13:46 David G. Johnston <david.g.johnston@gmail.com>
parent: czezz <czezz@o2.pl>
2 siblings, 0 replies; 4+ messages in thread
From: David G. Johnston @ 2017-04-24 13:46 UTC (permalink / raw)
To: czezz <czezz@o2.pl>; +Cc: pgsql-admin
On Monday, April 24, 2017, czezz <czezz@o2.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?
>
>
Not without third-party software. Or separating the databases into their
own clusters. You have more logical decoding options since 9.4 though I'm
not personally familiar with their use.
David J.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Replicate only 1 out of 2 databases of Server A to Server B ?
@ 2017-04-24 13:55 Scott Mead <scottm@openscg.com>
parent: czezz <czezz@o2.pl>
2 siblings, 0 replies; 4+ messages in thread
From: Scott Mead @ 2017-04-24 13:55 UTC (permalink / raw)
To: czezz <czezz@o2.pl>; +Cc: pgsql-admin
On Mon, Apr 24, 2017 at 9:33 AM, czezz <czezz@o2.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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2017-04-24 13:55 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24 13:33 Replicate only 1 out of 2 databases of Server A to Server B ? czezz <czezz@o2.pl>
2017-04-24 13:45 ` John Scalia <jayknowsunix@gmail.com>
2017-04-24 13:46 ` David G. Johnston <david.g.johnston@gmail.com>
2017-04-24 13:55 ` Scott Mead <scottm@openscg.com>
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