Re: [HACKERS] Database replication... - Mission Critica

From: Neil Conway <neilc(at)samurai(dot)com>
To: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
Cc: "Mikheev, Vadim" <VMIKHEEV(at)sectordata(dot)com>, "'Bill Gribble'" <grib(at)linuxdevel(dot)com>, "Greg Patnude" <GPatnude(at)adelphia(dot)net>, <pgsql-hackers(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [HACKERS] Database replication... - Mission Critica
Date: 2002-11-08 02:28:12
Message-ID: 878z047q2r.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> Also, what about if the two servers get the 'begin' command at marginally
> different times, then even:
>
> INSERT INTO foo VALUES (CURRENT_TIMESTAMP);
>
> Will be different on each different machine.

Yeah -- and gettimeofday() will be inconsistent for a slightly
different reason. In fact, if a function depends on anything other
than its arguments, you're probably going to have problems replicating
it in a sane manner if you send the query string alone.

One possible solution would be to dump the idea of sending query
strings, and just send tuple-level changes. The basic idea is to
execute a data-modifying txn locally, determine the tuple-level
changes that it makes, rollback the txn locally, and then broadcast
the tuple modifications to all the nodes in the cluster. Of course,
it's a bit more complex than that (read the Postgres-R paper for more
details), but that's the gist of it.

... which makes me think that rather than wasting our time discussing
a more-or-less solved problem, we'd be better off helping to implement
Postgres-R.

> Even nastier, what about if the different postgres servers in the cluster
> run on different architectures! That way you'd get different floating point
> results on each machine...

IMHO, that falls into the category of: "Dr., it hurts when I do this!"
-- "Well, don't do it then" :-)

Cheers,

Neil

--
Neil Conway <neilc(at)samurai(dot)com> || PGP Key ID: DB3C29FC

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hadley Willan 2002-11-08 02:38:13 Recursive call indicator/counter
Previous Message Bill Gribble 2002-11-08 01:51:38 Re: [HACKERS] Database replication... - Mission Critica

Browse pgsql-hackers by date

  From Date Subject
Next Message Billy G. Allie 2002-11-08 02:37:05 Re: [PORTS] PostgreSQL supported platform report and a
Previous Message Billy G. Allie 2002-11-08 02:11:26 Re: [HACKERS] PostgreSQL supported platform report and a patch.