From: | Soulabaille Samantha <samantha(dot)soulabaille(at)sihpic(dot)fr> |
---|---|
To: | "Ben K(dot)" <bkim(at)coe(dot)tamu(dot)edu>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: two databases in one |
Date: | 2006-08-16 14:44:54 |
Message-ID: | 44E32F66.2060600@sihpic.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Thanks for your response.
Indeed , the serials are used as foreign keys.
We made a web site with a database. Then we duplicated the web site and
the databse (without data, only schéma) for another server .
The 2 databases were filled in the same time.
Now someone would like to merge the 2 databases and have only 1 site and
1 database.
I was thinking about changing serials of the 2nd database and do a
restore on the 1st, as you said.
But it's a big database, and i'm not sure of the exactly things to do.
Ben K. a écrit :
>> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
>
Attachment | Content-Type | Size |
---|---|---|
samantha.soulabaille.vcf | text/x-vcard | 213 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2006-08-16 15:53:30 | Re: Restoring database question, part 2.. |
Previous Message | Erika Terahata Torres Prada e Silva - MPS | 2006-08-16 14:25:38 | Issue on Varchar Ordering |