> 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.
From: Carel Combrink <s25291930(at)tuks(dot)co(dot)za>
Date: 21/05/2010 13:20
Subject: [NOVICE] Transferring Data between databases
Sent by: pgsql-novice-owner(at)postgresql(dot)org
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
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.
This message and attachments are subject to a disclaimer. Please refer
to www.it.up.ac.za/documentation/governance/disclaimer/ for full
details. / Hierdie boodskap en aanhangsels is aan 'n vrywaringsklousule
onderhewig. Volledige besonderhede is by
Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
To make changes to your subscription:
"The information in this e-mail and any attachment is intended only for
the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or any
attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."
In response to
pgsql-novice by date
|Next:||From: Andreas Schmitz||Date: 2010-05-21 08:35:39|
|Subject: Re: Transferring Data between databases|
|Previous:||From: Carel Combrink||Date: 2010-05-21 07:50:09|
|Subject: Transferring Data between databases|