That's exactly what I'm looking for as well.
Yours,
tom
> Hi,
>
> RubyRep works on triggers and which can only be defined on existing
> tables. So it is not possible to have a replication which involves
> any DDL operation i.e. only DML operations can be replicated.
Hm... couldn't TableSpecResolver#resolve create the tables on the
destination side rather than just raising that exception?
Yours,
tom
Hi Arndt -
Thanks for rubyrep! And you're right, those concerns are very
valid... I agree, this problem is extremely tricky and it's easy for
something to go terribly wrong.
I'm wondering if there's some way to make it workable in the certain
narrow case where we're using Rails+ActiveRecord+PostgreSQL and only
using rubyrep as a hot standby, so schema changes (and writes in
general) are only made to one DB. Let's see, what situations would
we hit:
- if a new table is created in the "left" db, add triggers to new
table in "left" db and create the table in the "right" db
- if a table schema changes in the "left" db, drop that table in the
"right" db, recreate it, and resync This would mean a complete rsync
of that table, which would be terrible for large tables... but it
would work. Alternatively, we could hack ActiveRecord migrations to
record DDL changes somewhere and rubyrep could pick those up. That
would be really tricky though... very failure-prone.
Hm... trying to think of any other situations. I agree, this is a
doozy...
Yours,
Tom