Re: Transferring Data between databases

From: Andreas Schmitz <mailinglist(at)longimanus(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Cc: Carel Combrink <s25291930(at)tuks(dot)co(dot)za>, pgsql-novice-owner(at)postgresql(dot)org
Subject: Re: Transferring Data between databases
Date: 2010-05-21 08:35:39
Message-ID: 4BF645DB.80907@longimanus.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

hi carel,

you could use a trigger to copy the data needed into separate tables.
this tables could be used to sync the data.

regards

andreas

Jayadevan M wrote:
>> 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?
>>
>
> If connectivity between the two servers is poor, the triggers may fail and
> your actual transactions may be rolled back, right? Are you looking to
> replicate a large number of tables or just a few tables? You could have a
> trigger populate the data to files (that way the original transactions do
> not get affected) and then schedule a job to process the files and move
> data to the other server. If the connectivity is good and only a few
> tables need to be replicated, you could try triggers with a database link.
>
> I am a PostgreSQL novice. So my suggestions may not be the best.
> Regards,
> Jayadevan
>
>
>
> From: Carel Combrink <s25291930(at)tuks(dot)co(dot)za>
> To: pgsql-novice(at)postgresql(dot)org
> Date: 21/05/2010 13:20
> Subject: [NOVICE] Transferring Data between databases
> Sent by: pgsql-novice-owner(at)postgresql(dot)org
>
>
>
> 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
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message John Gage 2010-05-21 08:42:56 Limit to number of tables and table drops
Previous Message Jayadevan M 2010-05-21 08:23:08 Re: Transferring Data between databases