X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B3A685362A for ; Wed, 20 Apr 2005 15:50:02 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 08859-01 for ; Wed, 20 Apr 2005 18:49:47 +0000 (GMT) Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by svr1.postgresql.org (Postfix) with ESMTP id 8E77453CFF for ; Wed, 20 Apr 2005 14:13:42 -0300 (ADT) Received: from polaris.pinpointresearch.com (66-7-238-130.cust.telepacific.net [66.7.238.130]) by svr2.postgresql.org (Postfix) with ESMTP id 06B94F11B5 for ; Wed, 20 Apr 2005 18:04:20 +0100 (BST) Received: from betelgeuse.pinpointresearch.com (betelgeuse.pinpointresearch.com [192.168.1.179]) by polaris.pinpointresearch.com (Postfix) with ESMTP id 9C3821043E; Wed, 20 Apr 2005 10:00:57 -0700 (PDT) From: Steve Crawford Organization: Pinpoint Research To: shadow@s3os.net, pgsql-admin@postgresql.org Subject: Re: Database syncronization Date: Wed, 20 Apr 2005 10:00:57 -0700 User-Agent: KMail/1.5.1 References: <200504201844.27060.shadow@s3os.net> In-Reply-To: <200504201844.27060.shadow@s3os.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200504201000.57192.scrawford@pinpointresearch.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.077 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200504/289 X-Sequence-Number: 17302 On Wednesday 20 April 2005 9:44 am, Shadow wrote: > Hy all ! > > Is there any tool, middelware, or feature to syncronize 2 databases > (With the same schema, ofcourse) > > I have an application that runs from 2 points. One of this points > has a master database and the other point neds to sync its data > daily from the master. There are several options depending on your needs. If you just need a second machine updated daily then just do a pg_dumpall from the master and restore it on the second machine (all automated from cron). Alternately, in 8.x you can copy the master's files to the second machine and then just use the WAL files to keep the second machine up-to-date. If you like this option check the backup section of the documentation, especially section 22.3, to read about on-line backup and recovery. For near real-time replication you can use a replication solution like slony-i. All of the above assume that all modifications to the database are done to the master and simply duplicated one way or another to a slave. There are also projects that act as connection-pooling and load-balancing solutions that write all changes to multiple databases. I believe dbbalancer is one but it is listed as "Alpha" and the last update was in 2002. Cheers, Steve