Re: replicating a table in several databases

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Chris Browne" <cbbrowne(at)acm(dot)org>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: replicating a table in several databases
Date: 2008-10-15 00:14:16
Message-ID: dcc563d10810141714w573b88e5l1f3c8a552891126e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Oct 10, 2008 at 8:59 AM, Chris Browne <cbbrowne(at)acm(dot)org> wrote:
> gherzig(at)fmed(dot)uba(dot)ar (Gerardo Herzig) writes:
>> Hi all. Im facing a situation where i have to replicate a table from
>> database A in databases B,C,F and so on.
>>
>> The first (and only) thing i have in mind is using triggers with dblink
>> for comunications with the other DB's.
>>
>> I dont even like the idea of replicating tables across databases, but it
>> is kind of an order :(
>>
>> Since dblink is not transactional, it seems error prone over time, so
>> the tables will be inconsistent sooner or later, right?
>>
>> Do any have some less error-prone idea for this?
>
> Two answers tend to come up:
> a) Slony-I (which I work on; URL below)
> b) Londiste (originated by "Skype folks"; see also "Skype Tools")
>
> Slony-I has more documentation; Londiste is reputed to be a bit easier
> to configure (though being somewhat documentation-light may still
> leave the bar set pretty high).

Given the the OP specifically mentions replicating a single table from
one to multiple databases, I'd tend to recommend slony. It's quite
versatile at strange replication configurations. I didn't think
setting it up was all that hard, once you understood the basics of how
it works. I love that I can switch out a database server at work in
seconds to minutes if I need to, with a single fairly simple bash
script.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message zouguanghui 2008-10-15 00:59:28 Re: replicating a table in several databases
Previous Message Scott Marlowe 2008-10-15 00:01:04 Re: effectiveness tool