pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-admin@postgresql.org
Subject: Re: postgres in HA constellation
Date: Wed, 11 Oct 2006 10:28:44 -0400
Message-ID: <20061011142844.GA25181@phlogiston.dyndns.org> (raw)
In-Reply-To: <8689D509-4511-406B-AF5F-A245E2DC9008@enterprisedb.com>
References: <20061005042417.87F0FC027@ogo.rapideye.de>
	<20061005184154.GE8826@phlogiston.dyndns.org>
	<8689D509-4511-406B-AF5F-A245E2DC9008@enterprisedb.com>

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.

> 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.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
In the future this spectacle of the middle classes shocking the avant-
garde will probably become the textbook definition of Postmodernism. 
                --Brad Holland



view thread (15+ messages)  latest in thread

Message-ID: <20061011142844.GA25181@phlogiston.dyndns.org>
Permalink:  ../20061011142844.GA25181@phlogiston.dyndns.org/
Also on:    postgresql.org/message-id/20061011142844.GA25181@phlogiston.dyndns.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: ajs@crankycanuck.ca
  Subject: Re: postgres in HA constellation
  In-Reply-To: <20061011142844.GA25181@phlogiston.dyndns.org>
  References: <20061005042417.87F0FC027@ogo.rapideye.de> <20061005184154.GE8826@phlogiston.dyndns.org> <8689D509-4511-406B-AF5F-A245E2DC9008@enterprisedb.com> <20061011142844.GA25181@phlogiston.dyndns.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox