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

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Neil Conway" <neilc(at)samurai(dot)com>, "Mikheev, Vadim" <VMIKHEEV(at)sectordata(dot)com>
Cc: "'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 01:36:43
Message-ID: GNELIHDDFBOCMGBFGEFOEEHMCEAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> "Mikheev, Vadim" <VMIKHEEV(at)sectordata(dot)com> writes:
> > > My presumption would be that if you initialize 2 databases to
> > > a known identical start, have all the same triggers and rules
> > > on both, then send all queries to both databases, you will
> > > have 2 identical databases at the end.
> >
> > This is wrong assumption.
>
> Agreed. Another simple example is:
>
> INSERT INTO foo VALUES (random());

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.

In fact, how is this usually handled in 2PC? You'd have to have the current
time go along with the commit command when it's sent to each server...

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

Chris

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas T. Thai 2002-11-08 01:42:13 Re: Restoring a db dump with tsearch fields fails
Previous Message Robert John Shepherd 2002-11-08 01:29:32 Restoring a db dump with tsearch fields fails

Browse pgsql-hackers by date

  From Date Subject
Next Message Bill Gribble 2002-11-08 01:51:38 Re: [HACKERS] Database replication... - Mission Critica
Previous Message Christopher Kings-Lynne 2002-11-08 01:32:16 Re: [ pgsql-monitoring ]