Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 25DC6632FE5 for ; Mon, 8 Feb 2010 18:39:08 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 88675-05 for ; Mon, 8 Feb 2010 22:38:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yx0-f202.google.com (mail-yx0-f202.google.com [209.85.210.202]) by mail.postgresql.org (Postfix) with ESMTP id 7527D63249B for ; Mon, 8 Feb 2010 18:38:57 -0400 (AST) Received: by yxe40 with SMTP id 40so2843925yxe.19 for ; Mon, 08 Feb 2010 14:38:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=pbSnG+zSjFjHey27F7q0N7JIBEQGD5nzbpSg47j6x+4=; b=Iis5P2zldDsmfT0EvtBkdK/Hm/TuJdvGvkyqrmXT53AA2s0HCTUTZ4ZQ8+fNSEAb2Z DkFeficC1dSpVASqSuePVWF0Ghsgu6n3z0gDgtAuXO9npbOQkkeY7w1Si95sB2GFllel IDeHnx8ZQA9aqSqLOkUrh01C82qzQXB7R1yqI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=XiSKBkFK0tYcSXGW1TMxgBrjnRv2mwVlq+02K42W9QoZOa4XTGuE/sqACW3bfl0jTk sXkjlX96JepFJGssw/5bf4rgmlhR+/EVHv+4DWl4h0TcNcC19ncyA0iJ7enNh+OI4ERa TbytIehR4JX3B7rOaMXPy9gelULnDWJZ8fqHw= MIME-Version: 1.0 Received: by 10.90.57.19 with SMTP id f19mr6316087aga.36.1265668735014; Mon, 08 Feb 2010 14:38:55 -0800 (PST) In-Reply-To: <99024f5f1002071922j5b14c350mb1612313690f16ec@mail.gmail.com> References: <99024f5f1002071922j5b14c350mb1612313690f16ec@mail.gmail.com> Date: Mon, 8 Feb 2010 15:38:54 -0700 Message-ID: <37d451f71002081438v10f87e0ax1ae6533a958e9691@mail.gmail.com> Subject: Re: Best Replication Tool From: Rosser Schwarz To: Kiswono Prayogo Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.718 tagged_above=-10 required=5 tests=AWL=-0.880, BAYES_00=-2.599, FS_REPLICA=1.041, SARE_SPEC_REPLICA=0.72 X-Spam-Level: X-Archive-Number: 201002/57 X-Sequence-Number: 33660 On Sun, Feb 7, 2010 at 8:22 PM, Kiswono Prayogo wrote: > Hi, i'm really new to postgresql replication, was there any > replication tool for postgresql that can do real-time replication from > 1 database to ~3-10 database (on the other machines) with little > overhead for load balancing purpose? If, by "real time", you mean that a tuple created or changed on the master is visible to queries on an arbitrary slave within a few seconds, then Bucardo and Slony are both good candidates. I've used Bucardo in just such an environment, along with its master-master capability. Of the two, I definitely prefer the former, but this isn't an advocacy list, and they both work. The amount of overhead you'll experience is a function of how "chatty" your data is -- the higher the volume of changes it needs to replicate, the more work it will take to keep those changes flowing out to the slave nodes. If you update the same tuple three times in a five second period, that's three tuples you'll be replicating out to each slave. Another important consideration is the size of your replication sets (in Slony terms; "herds" in Bucardo). The bigger they are -- the more tables they include -- the more work it will take to replicate any changes in any of their member objects. IME, you'll typically do well to keep your sets down to the smallest meaningful groups you can. Particularly, you'll want to group together tables that are interrelated by foreign keys (this is especially important if you're using Slony, and have any plans to support switching masters), or that you expect to be modified together -- for example, all the tables that might be modified in the course of a new order being entered into your OLTP application. rls -- :wq