Re: Database synchronization

From: Richard Huxton <dev(at)archonet(dot)com>
To: Jyoti Seth <jyotiseth2001(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Database synchronization
Date: 2007-07-25 10:24:11
Message-ID: 46A724CB.3030405@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Try not to start a new thread (question) by replying to an old one - it
can mean some people don't see your question.

Jyoti Seth wrote:
> Hi,
>
> I have two postgres databases "Db1" and "Db2" on different linux servers.
> "DB1" is my master server and its data updates very frequently.
>
> My application access DB2 database, which in turn requires data from Db1
> database.

OK

> The same can be achieved in either of the following ways:
> 1. I can have the same tables from Db1 in the Db2 database and use some
> replication process to update these tables say using Slony-I. And then our
> application accesses the data from the single database.

Yes

> 2. Or I can use dblink to fetch the data from the master database only.

Yes

also:

3. Write a layer in your application / between the application &
database which routes queries to the correct database.

> My problem is my master database changes frequently and I always require the
> latest information.

Well, if by "latest" you mean you can't have any delay at all you'll
have to use #2 or #3.

However, that could be slow if you need to join a lot of data from DB1
to DB2. Can you provide more details of what each contains?

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jyoti Seth 2007-07-25 10:40:27 Re: Database synchronization
Previous Message Jyoti Seth 2007-07-25 10:12:41 Database synchronization