Re: Asychronous database replication

From: Greg Stark <gsstark(at)mit(dot)edu>
To: John DeSoi <desoi(at)pgedit(dot)com>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Chris Browne <cbbrowne(at)acm(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Asychronous database replication
Date: 2005-09-16 18:39:14
Message-ID: 878xxwsvql.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

John DeSoi <desoi(at)pgedit(dot)com> writes:

> > If you need data to propagate from the clients back to the server then things
> > get more complicated. Even then you could side step a lot of headaches if you
> > can structure the application in specific ways, such as guaranteeing that the
> > clients can only insert, never update records.
>
> And even updates could be OK if the application can support the right
> partitioning of the data and only do it one place at a time. With some kinds
> of field based work it might be suitable to have global (read only) data along
> with data created in the field that is site/ client specific. As long as the
> data collected in the field is not being updated on the master, it could
> continue to be updated in the field and synced back to the master database.

Sure, though then you have to deal with what data to display on the client
end. The most recently downloaded master data or the locally updated data?
What about after you upload your local data when you're not sure whether the
master data has been reconciled? Not impossible but it would be more work.

But I find a surprisingly high fraction of applications are very amenable to
being handled as insert-only. A medical application strikes me as something
someone is all the more likely to be happy with an insert-only model.

So instead of allowing having remote users to modify data directly you only
allow them to "request" an update. Then when they look at the record it still
makes logical sense to see the old data, along with their "requested" updates.

Essentially, any replication system is based on insert-only queues. If you can
design the application around that you avoid having to implement some sort of
mapping to some hiding that.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Roger Hand 2005-09-16 19:06:19 Re: Setting WHERE on a VIEW with aggregate function.
Previous Message David Fetter 2005-09-16 18:35:49 Re: Create a pg table from CSV with header rows