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 F07B23A4CEA for ; Sun, 23 Jan 2005 22:43:26 +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 88627-01 for ; Sun, 23 Jan 2005 22:43:22 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id D2D8D3A4F50 for ; Sun, 23 Jan 2005 22:43:24 +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 6942119; Sun, 23 Jan 2005 14:45:06 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org Subject: Re: PostgreSQL clustering VS MySQL clustering Date: Sun, 23 Jan 2005 14:42:52 -0800 User-Agent: KMail/1.6.2 Cc: Tatsuo Ishii , darcy@wavefire.com, jd@www.commandprompt.com, sfrost@snowman.net, herve@elma.fr References: <200501201949.24292.josh@agliodbs.com> <200501210947.53938.josh@agliodbs.com> <20050122.120128.74753619.t-ishii@sra.co.jp> In-Reply-To: <20050122.120128.74753619.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: <200501231442.52830.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.011 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/428 X-Sequence-Number: 10118 Tatsuo, > I'm not clear what "pgPool only needs to monitor "update switching" by > > *connection* not by *table*" means. In your example: > > (1) 00:00 User A updates "My Profile" > > (2) 00:01 "My Profile" UPDATE finishes executing. > > (3) 00:02 User A sees "My Profile" re-displayed > > (6) 00:04 "My Profile":UserA cascades to the last Slave server > > I think (2) and (3) are on different connections, thus pgpool cannot > judge if SELECT in (3) should go only to the master or not. > > To solve the problem you need to make pgpool understand "web sessions" > not "database connections" and it seems impossible for pgpool to > understand "sessions". Depends on your connection pooling software, I suppose. Most connection pooling software only returns connections to the pool after a user has been inactive for some period ... generally more than 3 seconds. So connection continuity could be trusted. -- Josh Berkus Aglio Database Solutions San Francisco