Discussion:
[ADMIN] Merging two databases
(too old to reply)
Lukasz Brodziak
2012-06-12 10:23:41 UTC
Permalink
Hi there,

Is there a way of merging two databases in postgresql in the way of
differential replication? The thing is that we have two DBs with same
schemas and we want to merge the data within them into one single
replica. Are there any tools/ways of doing this? Of course when the
merged db is created it will be only updated/inserted with new data
from each of source DBs.
--
Ɓukasz Brodziak
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Craig Ringer
2012-06-13 02:08:46 UTC
Permalink
Post by Lukasz Brodziak
Hi there,
Is there a way of merging two databases in postgresql in the way of
differential replication? The thing is that we have two DBs with same
schemas and we want to merge the data within them into one single
replica. Are there any tools/ways of doing this?
I think you'll want Bucardo or Slony-I for this. You certainly can't do
it with the built-in replication.

--
Craig Ringer
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Amador Alvarez
2012-06-14 18:34:20 UTC
Permalink
Hi,
Obviously it will always depends on the constraints in your schema, but
why do not dump the databases out and import it into a single one
properly? Once you get the new database, it should be easy to catch up
with the 2 databases before the switching (with statements like
insert/update into Newdb tables ...(select from Olddb tables)).
It is up to you, this is to avoid replication settings, however using
replication could be a good thing for future replication experiences.

A.A.
Post by Lukasz Brodziak
Hi there,
Is there a way of merging two databases in postgresql in the way of
differential replication? The thing is that we have two DBs with same
schemas and we want to merge the data within them into one single
replica. Are there any tools/ways of doing this? Of course when the
merged db is created it will be only updated/inserted with new data
from each of source DBs.
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Loading...