pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Jyoti Seth <jyotiseth2001@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Database synchronization
Date: Wed, 25 Jul 2007 11:24:11 +0100
Message-ID: <46A724CB.3030405@archonet.com> (raw)
In-Reply-To: <004e01c7cea4$58046570$080d3050$@com>
References: <20070724143737.GA25948@apartia.fr>
	<004e01c7cea4$58046570$080d3050$@com>

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



view thread (17+ messages)  latest in thread

Message-ID: <46A724CB.3030405@archonet.com>
Permalink:  ../46A724CB.3030405@archonet.com/
Also on:    postgresql.org/message-id/46A724CB.3030405@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, jyotiseth2001@gmail.com
  Subject: Re: Database synchronization
  In-Reply-To: <46A724CB.3030405@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox