Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 250729FB7FD for ; Wed, 25 Jul 2007 07:24:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 34549-04 for ; Wed, 25 Jul 2007 07:24:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 53F6A9FB79C for ; Wed, 25 Jul 2007 07:24:14 -0300 (ADT) Received: from server3.office.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id EDD9E772A4; Wed, 25 Jul 2007 11:24:11 +0100 (BST) Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id D48AB274059; Wed, 25 Jul 2007 11:24:11 +0100 (BST) Message-ID: <46A724CB.3030405@archonet.com> Date: Wed, 25 Jul 2007 11:24:11 +0100 From: Richard Huxton User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: Jyoti Seth Cc: pgsql-sql@postgresql.org Subject: Re: Database synchronization References: <20070724143737.GA25948@apartia.fr> <004e01c7cea4$58046570$080d3050$@com> In-Reply-To: <004e01c7cea4$58046570$080d3050$@com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/144 X-Sequence-Number: 28879 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