Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 09D5F1336018 for ; Mon, 20 Sep 2010 14:33:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 31366-05 for ; Mon, 20 Sep 2010 17:33:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outbound.afilias.info (outbound.afilias.info [69.46.124.26]) by mail.postgresql.org (Postfix) with ESMTP id 2072E1337B50 for ; Mon, 20 Sep 2010 14:33:37 -0300 (ADT) Received: from ms5.yyz2.afilias-ops.info ([10.50.129.111] helo=smtp.afilias.info) by outbound.afilias.info with esmtp (Exim 4.69) (envelope-from ) id 1OxkFE-0003fn-3h for pgsql-general@postgresql.org; Mon, 20 Sep 2010 17:33:36 +0000 Received: from tor-gateway.afilias.info ([199.15.87.4] helo=[10.10.46.12]) by smtp.afilias.info with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1OxkFE-0001ub-3K for pgsql-general@postgresql.org; Mon, 20 Sep 2010 17:33:36 +0000 Message-ID: <4C979AEF.9030402@ca.afilias.info> Date: Mon, 20 Sep 2010 13:33:35 -0400 From: Brad Nicholson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100916 Lightning/1.0b2 Thunderbird/3.1.4 MIME-Version: 1.0 To: pgsql-general@postgresql.org Subject: Re: Binary Replication and Slony References: <201009201649.o8KGnAn00996@momjian.us> In-Reply-To: <201009201649.o8KGnAn00996@momjian.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.109 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FS_REPLICA=3.599, RCVD_IN_DNSWL_MED=-2.3, SARE_SPEC_REPLICA=0.72, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/613 X-Sequence-Number: 167415 On 10-09-20 12:49 PM, Bruce Momjian wrote: > John Cheng wrote: >> Congrats on the 9.0 release of PostgreSQL. One of the features I am really >> interested in is the built-in binary replication. >> >> Our production environment has been using PostgreSQL for more than 5 years >> (since this project started). We have been using Slony-I as our replication >> mechanism. I am interested to find out the pros and cons of Slony vs the >> built-in replication in 9.0. Based on what I understand: >> >> * Slony has a higher overhead than the binary replication in 9.0 >> * When using Slony, schema change must be applied via slonik (in most cases) >> * Unfortunately, IMO it is easy to make a mistake when applying schema >> changes in Slony, fortunately, it is easy to drop and recreate the >> replication sets >> * Slony is an asynchronous replication mechanism >> * Slony allows you to replication some tables, while ignoring others >> >> * PostgreSQL 9.0 with hot standby& streaming replication is an asynchronous >> replication mechanism >> * Overhead is low compared to Slony >> >> Are there some cases where it is better to use Slony, for example, when you >> must specifically exclude tables from replication? I believe our system will >> be better off using the built-in replication mechanism of 9.0, and I am >> guessing most people will be in the same boat. > You have summarized the differences well. Streaming replication has > lower overhread, but doesn't allow per-table granularity or allow > replication between different versions of Postgres. > Slony will also allow you to: -run custom schema (like extra indexes) on replicas -replicate between different hardware architectures and OS's -run lengthy queries against replicas having to worry about trade offs surrounding query cancellation vs standby lagging. -switch roles of two nodes without entering a degraded state or worrying about STONITH. If you switch roles in a controlled manner, both nodes remain in the cluster. Slony prevents writes against the replica. I do agree that for most, Slony is overkill and streaming replication and hot standby will be the better choice. -- Brad Nicholson 416-673-4106 Database Administrator, Afilias Canada Corp.