Thread: PostGreSQL Replication

PostGreSQL Replication

From
Gabriele
Date:
I know this is a delicate topic which must be approached cautiously.

Let's have a server which feed data to multiple slaves, usually using
direct online connections. Now, we may want to allow those client to
sync the data to a local replica, work offline and then resync the
data back to the server. Which is the easiest way to approach this
problem?

Can you address me to tools, documentation, tech reference or other
resource on this topic? I've found people talking about Slony-I, what
can you tell me on this tool? Are there other tools?

Moreover, additionally to the previous question, let's take the case i
do have multiple indipendent and separate server and then i want to
upload the information of these server (actually not everything but a
subset of the data) to another server (here we have a unidirectional
comm, as opposed to previous bidirectional comm and we have asymmetric
structure as opposed to the previous exact replica), what are the
tools, documentation, best practices or other resources to approach
this problem?

Thank you!


Re: PostGreSQL Replication

From
Andrew Sullivan
Date:
On Sat, Jul 07, 2007 at 05:16:56AM -0700, Gabriele wrote:
> Let's have a server which feed data to multiple slaves, usually using
> direct online connections. Now, we may want to allow those client to
> sync the data to a local replica, work offline and then resync the
> data back to the server. Which is the easiest way to approach this
> problem?

Write yourself a new system that does it?  To my knowledge, nobody
has yet built a production-ready system that can do this sort of
multi-master merge-back replication.  I can think of possible ways
you could bodge this up using Slony-I and log shipping, but I don't
think it'd be pretty.

> resource on this topic? I've found people talking about Slony-I, what
> can you tell me on this tool? Are there other tools?

You can find out more about Slony-I at <http://www.slony.info>.

> Moreover, additionally to the previous question, let's take the case i
> do have multiple indipendent and separate server and then i want to
> upload the information of these server (actually not everything but a
> subset of the data) to another server (here we have a unidirectional
> comm, as opposed to previous bidirectional comm and we have asymmetric
> structure as opposed to the previous exact replica), what are the
> tools, documentation, best practices or other resources to approach
> this problem?

This also sounds like a multimaster problem, and again I know of no
system that currently supports what you're talking about.  This is
easier to bodge together under Slony using views and such like, but
it's still not trivial.  If you wish to discuss how to do this with
Slony, I suggest taking it up on that list (available from the site
mentioned above).

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
A certain description of men are for getting out of debt, yet are
against all taxes for raising money to pay it off.
        --Alexander Hamilton

Re: PostGreSQL Replication

From
Guido Neitzer
Date:
On 07.07.2007, at 06:16, Gabriele wrote:

> Let's have a server which feed data to multiple slaves, usually using
> direct online connections. Now, we may want to allow those client to
> sync the data to a local replica, work offline and then resync the
> data back to the server. Which is the easiest way to approach this
> problem?

I don't know anything for PostgreSQL doing that.

FrontBase [1] might have something like that if I understood Geert
correctly. But I'm not sure about that. Maybe you ask them directly.
There DBMS is free but not open source though.

cug

[1] http://www.frontbase.com

Re: PostGreSQL Replication

From
Adrian von Bidder
Date:
On Saturday 07 July 2007 14.16:56 Gabriele wrote:
> I know this is a delicate topic which must be approached cautiously.
>
> Let's have a server which feed data to multiple slaves, usually using
> direct online connections. Now, we may want to allow those client to
> sync the data to a local replica, work offline and then resync the
> data back to the server. Which is the easiest way to approach this
> problem?

Sounds like something you'd want to handle within the application, not at
the database layer.  The application can know much more about how data is
modified and how it can be modified safely so a later merge operation won't
fail, or how merge conflicts (however these are defined) can be safely
handled.  The database must assume that a user can modify "anything" during
the offline period, and can't assume anything about what to do on merge
operations.

cheers
-- vbi

--
The days just prior to marriage are like a snappy introduction to a
tedious book.

Attachment

Re: PostGreSQL Replication

From
Gabriele
Date:
> Sounds like something you'd want to handle within the application

I believe i will try to follow this path.