Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] database replication

From: Ed Loehr <ELOEHR(at)austin(dot)rr(dot)com>
To: DWalker(at)black-oak(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] database replication
Date: 1999-12-25 00:22:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
DWalker(at)black-oak(dot)com wrote:

> 6) To handle replication I basically check the local "last
> replication time" and compare it against the remote PGR_TIME
> fields.  If the remote PGR_TIME is greater than the last replication
> time then change the local copy of the database, otherwise, change
> the remote end of the database.  At this point I don't have a way to
> know WHICH field changed between the two replicas so either I do ROW
> level replication or I check each field.  I check PGR_TIME to
> determine which field is the most current.  Some fine tuning of this
> process will have to occur no doubt.

Interesting idea.  I can see how this might sync up two databases
somehow.  For true replication, however, I would always want every
replicated database to be, at the very least, internally consistent
(i.e., referential integrity), even if it was a little behind on
processing transactions.  In this method, its not clear how
consistency is every achieved/guaranteed at any point in time if the
input stream of changes is continuous.  If the input stream ceased,
then I can see how this approach might eventually catch up and totally
resync everything, but it looks *very* computationally  expensive.

But I might have missed something.  How would internal consistency be

> 7) The commandline utility, fired off by something like cron, could
> run several times during the day -- command line parameters can be

My two cents is that, while I can see this kind of database syncing as
valuable, this is not the kind of "replication" I had in mind.  This
may already possible by simply copying the database.  What replication
means to me is a live, continuously streaming sequence of updates from
one database to another where the replicated database is always
internally consistent, available for read-only queries, and never "too
far" out of sync with the source/primary database.

What does replication mean to others?

Ed Loehr

In response to


pgsql-hackers by date

Next:From: Marc G. FournierDate: 1999-12-25 02:15:12
Subject: Re: [HACKERS] Source code format votes
Previous:From: Bruce MomjianDate: 1999-12-24 22:03:56
Subject: Re: [HACKERS] Source code format votes

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group