Thread: Merge similar databases

Merge similar databases

From
Joy Martin Omello
Date:
Hi

I have a system running postgresql that I have installed on two different servers. My challenge is that I need another server that I can install the same system but to be in position to combine the three different but similar structure postgresql databases to have one main database.

I have a project that I am working on that is running in three different countries. Now, My plan is to have a server in each of these countries and later have one main server that contains all the data from these three countries.

Is this possible? if yes Main someone help me set this structure up.

Thank
Martin
#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}

Re: Merge similar databases

From
Josh Kupershmidt
Date:
On Wed, Oct 13, 2010 at 4:53 AM, Joy Martin Omello
<joymartinomello@gmail.com> wrote:
> Hi
>
> I have a system running postgresql that I have installed on two different
> servers. My challenge is that I need another server that I can install the
> same system but to be in position to combine the three different but similar
> structure postgresql databases to have one main database.
>
> I have a project that I am working on that is running in three different
> countries. Now, My plan is to have a server in each of these countries and
> later have one main server that contains all the data from these three
> countries.
>
> Is this possible? if yes Main someone help me set this structure up.

I'm not real clear on what exactly you're trying to accomplish. If
you're just trying to replicate un-related data from a few different
servers into a single database server, no big deal: I think several
popular asynchronous replication tools (Slony, etc.) will do that for
you.

If, on the other hand, you have several systems recording related data
(i.e. ultimately writing to the same tables on your "main database",
or tables related to each other), and you've got to somehow resolve
any conflicts between what Servers A and B claim, then you've got more
of a mess on your hands. See e.g.
<http://archives.postgresql.org/pgsql-general/2010-09/msg00916.php>

Josh