Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id BA43F9FB262 for ; Fri, 13 Oct 2006 12:52:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 05093-10 for ; Fri, 13 Oct 2006 12:52:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.libertyrms.com (vgateway.libertyrms.info [207.219.45.62]) by postgresql.org (Postfix) with ESMTP id 4BE899FA4EF for ; Fri, 13 Oct 2006 12:52:20 -0300 (ADT) Received: from dba5.int.libertyrms.com ([10.1.3.44]) by mail.libertyrms.com with esmtp (Exim 4.22) id 1GYPKY-0006Qi-Mo; Fri, 13 Oct 2006 11:52:14 -0400 Subject: Re: postgres in HA constellation From: Brad Nicholson To: "Jim C. Nasby" Cc: Andrew Sullivan , pgsql-admin@postgresql.org In-Reply-To: <20061011211246.GV13487@nasby.net> References: <20061005042417.87F0FC027@ogo.rapideye.de> <20061005184154.GE8826@phlogiston.dyndns.org> <8689D509-4511-406B-AF5F-A245E2DC9008@enterprisedb.com> <20061011142844.GA25181@phlogiston.dyndns.org> <20061011211246.GV13487@nasby.net> Content-Type: text/plain Date: Fri, 13 Oct 2006 11:52:14 -0400 Message-Id: <1160754734.20117.17.camel@dba5.int.libertyrms.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.2 (2.6.2-1.fc5.5) Content-Transfer-Encoding: 7bit X-SA-Exim-Mail-From: bnichols@ca.afilias.info X-SA-Exim-Scanned: No; SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.233 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/93 X-Sequence-Number: 23396 On Wed, 2006-10-11 at 16:12 -0500, Jim C. Nasby wrote: > On Wed, Oct 11, 2006 at 10:28:44AM -0400, Andrew Sullivan wrote: > > On Thu, Oct 05, 2006 at 08:43:21PM -0500, Jim Nasby wrote: > > > Isn't it entirely possible that if the master gets trashed it would > > > start sending garbage to the Slony slave as well? > > > > Well, maybe, but unlikely. What happens in a shared-disc failover is > > that the second machine re-mounts the same partition as the old > > machine had open. The risk is the case where your to-be-removed > > machine hasn't actually stopped writing on the partition yet, but > > your failover software thinks it's dead, and can fail over. Two > > processes have the same Postgres data and WAL files mounted at the > > same time, and blammo. As nearly as I can tell, it takes > > approximately zero time for this arrangement to make such a mess that > > you're not committing any transactions. Slony will only get the data > > on COMMIT, so the risk is very small. > > Hrm... I guess it depends on how quickly the Slony master would stop > processing if it was talking to a shared-disk that had become corrupt > from another postmaster. That doesn't depend on Slony, it depends on Postgres. If transactions are committing on the master, Slony will replicate them. You could have a situation where your HA failover trashes some of you database, but the database still starts up. It starts accepting and replicating transactions before the corruption is discovered. Brad.