Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id F1F3F9FB25F for ; Wed, 11 Oct 2006 18:12:53 -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 42212-07 for ; Wed, 11 Oct 2006 18:12:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 0B4819FB251 for ; Wed, 11 Oct 2006 18:12:48 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id EBF6956431; Wed, 11 Oct 2006 16:12:47 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Wed, 11 Oct 2006 16:12:46 -0500 Date: Wed, 11 Oct 2006 16:12:46 -0500 From: "Jim C. Nasby" To: Andrew Sullivan Cc: pgsql-admin@postgresql.org Subject: Re: postgres in HA constellation Message-ID: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061011142844.GA25181@phlogiston.dyndns.org> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:061011:ajs@crankycanuck.ca::lqxFXnGyUixW46LG:000000000000000000 0000000000000000000000008bgf X-Hashcash: 1:20:061011:pgsql-admin@postgresql.org::XoRN3zdwXQRMif7K:00000000000 0000000000000000000000004pY1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200610/84 X-Sequence-Number: 23387 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. > > I think PITR would be a much better option to protect against this, > > since you could probably recover up to the exact point of failover. > > That oughta work too, except that your remounted WAL gets corrupted > under the imagined scenario, and then you copy the next updates to > the WAL. So you have to save all the incremental copies of the WAL > you make, so that you don't have a garbage file to read. > > As I said, I don't think that it's a bad idea to use this sort of > trick. I just think it's a poor single line of defence, because when > it fails, it fails hard. Yeah, STONITH is *critical* for shared-disk. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)