Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2EDBC9FA1A7 for ; Tue, 10 Oct 2006 12:11:17 -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 21755-05 for ; Tue, 10 Oct 2006 12:11:11 -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 BD0309F9EF5 for ; Tue, 10 Oct 2006 12:11:10 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 9330156431; Tue, 10 Oct 2006 10:11:09 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Tue, 10 Oct 2006 10:11:08 -0500 Date: Tue, 10 Oct 2006 10:11:08 -0500 From: "Jim C. Nasby" To: Sebastian Reitenbach Cc: pgsql-admin@postgresql.org Subject: Re: postgres in HA constellation Message-ID: <20061010151108.GE72517@nasby.net> References: <20061006063425.49239C01C@ogo.rapideye.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061006063425.49239C01C@ogo.rapideye.de> 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:061010:itlistuser@rapideye.de::xFjVvbTKkgHU+IgQ:000000000000000 0000000000000000000000003ttD X-Hashcash: 1:20:061010:pgsql-admin@postgresql.org::MPKj6fRJCWrqMVZe:00000000000 0000000000000000000000001r8h X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.055 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200610/64 X-Sequence-Number: 23367 On Fri, Oct 06, 2006 at 06:34:25AM -0000, Sebastian Reitenbach wrote: > > 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. > > > > When it comes to the actual failover, take a look at the HA-linux > > project. They've got some stuff you could probably use (such as the > > heartbeat program). Another really good idea is to give the backup > > machine to kill the power to the primary machine, and not have either > > machine mount the shared storage at bootup. > As I am using carp on OpenBSD to setup HA cluster, I am very comfortable with > ucarp, the userland implementation for Linux. at boot up the default mount of > the database files is readonly and having the database not running, then > starting ucarp, and then only in case this machine becomes master, it remounts > the postgres data and shall start the database. > And I thought about that killing the power of the "lost" master after a > takeover too, to make sure hte machine will not come back unconditionally > later. Heh, I'd assumed you were on linux, but of course there's no reason you couldn't setup HA on OpenBSD. The key is just to make sure that you never bring up two servers on the same data directory. -- Jim Nasby jim@nasby.net EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)