Skip to Content

Can rs_subcmp allow datatype diffs that are implicitly convertable?

The new rs_subcmp is powerful, if a little hard to use.

But I have a situation where we're incrementally changing the schema for various databases across multiple replicated servers (specifically, upgrading from int to bigint)

The repserver has no problem replicating from int to bigint during our transition period, but rs_subcmp is more picky. It complains about type mismatches with messages like these:

  • Type mismatch for column #1 between the primary (8) and the replicate (30). [c/subcmp.c(3587)]
  • Length mismatch for column #1 between the primary (4) and the replicate (8). [c/subcmp.c(3596)]
  • Found 2 inconsistencies between the primary and the replicate - exiting ... [c/subcmp.c(3681)]

(Note, I am not using the -x schema compare option)

It's annoying that rs_subcmp doesn't have an option to skip the column type comparison

Any other suggestions for doing this? (other than writing a raft of custom select commands that do the conversion)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 13 at 04:14 PM

    Not tried myself but will it help if you put a view -- with needed datatypes -- on the table in question ?

    This may trick rs_subcmp into thinking that column datatypes match !

    HTH

    Avinash

    Add comment
    10|10000 characters needed characters exceeded