Re: two databases in one - Mailing list pgsql-admin

From Ben K.
Subject Re: two databases in one
Date
Msg-id Pine.GSO.4.64.0608160739500.7308@coe.tamu.edu
Whole thread Raw
In response to two databases in one  (Soulabaille Samantha <samantha.soulabaille@sihpic.fr>)
Responses Re: two databases in one  (Soulabaille Samantha <samantha.soulabaille@sihpic.fr>)
List pgsql-admin
> I've got two databases with the same tables and schema on two different
> servers.
> I want to have only one database.
> So i would like to insert in the first database the data of the second
> database.
> I don't know how to do this because almost of the tables contains serial.
> It's for production databases, i can't make mistakes.

Maybe you could just import the second database into another schema of
the first database if it's urgent...

Otherwise the nature of conflicts will have to be thought through, like

- Are there some data that exist in both databases - i.e. which become
duplicates if both tables are merged?

- Are the serials used as foreign keys in other tables or as the basis of
any other fields?

- Can the serials be changed to different numbers - e.g., is it ok or even
needed to convert "11" on database B to "10011" on database A and so on,
to avoid conflict two ID 11 records having different data?

- Does the order of records matter?


Once the problem is familiar, many gurus will be able to help. I just
wanted to provide a starter.


Regards,


Ben K.
Developer
http://benix.tamu.edu

pgsql-admin by date:

Previous
From: Soulabaille Samantha
Date:
Subject: two databases in one
Next
From: Erika Terahata Torres Prada e Silva - MPS
Date:
Subject: Issue on Varchar Ordering