pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron Johnson <ron.l.johnson@cox.net>
To: PgSQL General ML <pgsql-general@postgresql.org>
Subject: Re: Replication Ideas
Date: Sun, 24 Aug 2003 01:13:08 -0500
Message-ID: <1061705587.3733.452.camel@haggis> (raw)
In-Reply-To: <3F483EBD.3020108@travelamericas.com>
References: <3F483EBD.3020108@travelamericas.com>

On Sat, 2003-08-23 at 23:27, Chris Travers wrote:
> Hi--
> 
> I had been thinking of the issues of multimaster replication and how to 
> do highly available, loadballanced clustering with PostgreSQL.  Here is  
> my outline, and I am looking for comments on the limitations of how this 
> would work.
> 
> Several PostgreSQL servers would share a virtual IP address, and would 
> coordinate among themselves which will act as "Master" for the purposes 
> of a single transaction (but connection could be easier).  SELECT 
> statements are handled exclusively by the transaction master while 
> anything that writes to a database would be sent to all the the 
> "Masters."  At the end of each transaction the systems would poll 
> eachother regarding whether they were all successful:
> 
> 1:  Any system which is successful in COMMITting the transaction must 
> ignore any system which fails the transaction untill a recovery can be made.
> 
> 2:  Any system which fails in COMMITting the transaction must cease to 
> be a master, provided that it recieves a signat from any other member of 
> the cluster that indicates that that member succeeded in committing the 
> transaction.
> 
> 3: If all nodes fail to commit, then they all remain masters.
> 
> Recovery would be done in several steps:
> 
> 1:  The database would be copied to the failed system using pg_dump.
> 2:  A current recovery would be done from the transaction log.
> 3:  This would be repeated in order to ensure that the database is up to 
> date.
> 4:  When two successive restores have been achieved with no new 
> additions to the database, the "All Recovered" signal is sent to the 
> cluster and the node is ready to start processing again. (need a better 
> way of doing this).
> 
> Note:  Recovery is the problem, I know.  my model is only a starting 
> point for the purposes of discussion and trying to bring something to 
> the conversation.

This is vaguely similar to Two Phase Commit, which is a sine qua
non of distributed transactions, which is the s.q.n. of multi-master
replication.

-- 
-----------------------------------------------------------------
Ron Johnson, Jr. ron.l.johnson@cox.net
Jefferson, LA USA

"Eternal vigilance is the price of liberty: power is ever 
stealing from the many to the few. The manna of popular liberty 
must be gathered each day, or it is rotten... The hand entrusted 
with power becomes, either from human depravity or esprit de 
corps, the necessary enemy of the people. Only by continual 
oversight can the democrat in office be prevented from hardening 
into a despot: only by unintermitted agitation can a people be 
kept sufficiently awake to principle not to let liberty be 
smothered in material prosperity... Never look, for an age when 
the people can be quiet and safe. At such times despotism, like 
a shrouding mist, steals over the mirror of Freedom"
Wendell Phillips




view thread (22+ messages)  latest in thread

Message-ID: <1061705587.3733.452.camel@haggis>
Permalink:  ../1061705587.3733.452.camel@haggis/
Also on:    postgresql.org/message-id/1061705587.3733.452.camel@haggis

 · 

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-performance@postgresql.org
  Cc: ron.l.johnson@cox.net, pgsql-general@postgresql.org
  Subject: Re: Replication Ideas
  In-Reply-To: <1061705587.3733.452.camel@haggis>
  References: <3F483EBD.3020108@travelamericas.com> <1061705587.3733.452.camel@haggis>

* 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