X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2504F3A49E3 for ; Fri, 21 Jan 2005 03:49:45 +0000 (GMT) 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 38045-04 for ; Fri, 21 Jan 2005 03:49:37 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id 282FB3A496B for ; Fri, 21 Jan 2005 03:49:38 +0000 (GMT) X-EthosMedia-Virus-Scanned: no infections found Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6932417; Thu, 20 Jan 2005 19:51:20 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org Subject: Re: PostgreSQL clustering VS MySQL clustering Date: Thu, 20 Jan 2005 19:49:24 -0800 User-Agent: KMail/1.6.2 Cc: Tatsuo Ishii , darcy@wavefire.com, jd@www.commandprompt.com, sfrost@snowman.net, herve@elma.fr References: <20050120144416.GO10437@ns.snowman.net> <200501200929.37228.darcy@wavefire.com> <20050121.104007.74755729.t-ishii@sra.co.jp> In-Reply-To: <20050121.104007.74755729.t-ishii@sra.co.jp> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200501201949.24292.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.012 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/363 X-Sequence-Number: 10053 Tatsuo, > Yes. However it would be pretty easy to modify pgpool so that it could > cope with Slony-I. I.e. > > 1) pgpool does the load balance and sends query to Slony-I's slave and > master if the query is SELECT. > > 2) pgpool sends query only to the master if the query is other than > SELECT. > > Remaining problem is that Slony-I is not a sync replication > solution. Thus you need to prepare that the load balanced query > results might differ among servers. Yes, please, some of us are already doing the above ad-hoc. The simple workaround to replication lag is to calculate the longest likely lag (<3 seconds if Slony is tuned right) and have the dispatcher (pgpool) send all requests from that connection to the master for that period. Then it switches back to "pool" mode where the slaves may be used. Of course, all of the above is only useful if you're doing a web app where 96% of query activity is selects. For additional scalability, put all of your session maintenance in memcached, so that you're not doing database writes every time a page loads. -- Josh Berkus Aglio Database Solutions San Francisco