Re: Transferring Data between databases

From: Mladen Gogala <mladen(dot)gogala(at)vmsinfo(dot)com>
To: Carel Combrink <s25291930(at)tuks(dot)co(dot)za>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Transferring Data between databases
Date: 2010-05-23 01:44:13
Message-ID: 4BF8886D.6000102@vmsinfo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Carel Combrink wrote:
> Hi,
>
> I want to do the following: When data gets added to a table in one
> database a subset of that data must be sent to another database,
> perhaps on another computer. The primary database will not always be
> connected to the secondary one and must perhaps (not that urgent now)
> send the data (old and new) to the secondary database as soon as they
> are connected.
>
> Can I write triggers or something that will do this inside the database?
>
> I know Sloni-I and other software does replication but that is not
> really what I need (I think). I read up on some of these software but
> can't seem to find what I am looking for.
>
> If someone can point me in the right direction it will be appreciated.
>
> Thanks
>
As others have mentioned before, Slony and Bucardo replication packages
are designed to do just that, but there is an even more appealing
option. Postgres 9.0 will have what is in Oracle world known as "logical
standby". In other words, it will be possible to transport WAL archives
over the network, apply them to a replica DB, possibly on another
machine, and query the replica. The overhead will be very tiny compared
to the trigger-based packages like Slony and Bucardo because the primary
database will only ship the WAL archive to the replica ("logical
standby") which will do the rest of the magic. Of course, it all depend
on when do you need your DB, will the pg_migrate package be ready in
time, how big is your DB and many other variables.

--
Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
www.vmsinfo.com

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Mladen Gogala 2010-05-23 22:36:34 Sphinx indexing problem
Previous Message Joshua Tolley 2010-05-22 23:40:37 Re: Transferring Data between databases