> I don't know if it's possible but here is what I need to do: I've got
> ingres on one machine and postgres on another. When any record in
> particular table in ingres database is added/deleted/updated I'd like to
> transfer all this data to postgres.
>
> In postgres i can do such thing using "create function xxx language
> 'c'...." statement and compiling some code in C to manipulate date.
>
> IS there any chance to do "synchronizaton procedure" in ingres? Perhaps
> callproc - I'm not very familiar with ingres and its documentation is
> quite huge. If anyone could send me some hints how to start it... I
> would be really greatful.
Replication is a task that can mushroom out of control very easily, so I
hesitate to suggest this. But if you just want to propagate changes to one
table in one direction (from Ingres to PostgreSQL) then maybe it won't be
too bad.
One fairly simple approach would be to set up an "after" rule on the Ingres
table in question, to invoke a procedure that inserts into a queue table,
with an appropriate discriminator so that you know if it's an
insert/update/delete. You could then write an application that opens a
connection to both DBMSs to propagate changes from the Ingres queue table to
the PostgreSQL target. You could perhaps use an Ingres database event to
signal the the program to check the queue. You can add all kinds of logic
to do robust hand-shaking and error recovery too.
Alternatively you can Google for any of the various replication
products/project out there. Maybe one of them will fit.
Roy
weasel - 18 Oct 2007 20:24 GMT
If you don't want the update done immediately, I guess you could re-
create the SQL from INGRES since the last update using auditdb and run
the resultant SQL against the postgreSQL database. I know of one site
using this approach.