CardinalityViolation exceptions, database corruption?

I am guessing here, but the cardinality error is on post_number, it is meant to be unique by topic. My guess is you have a corrupt index there. I guess a fix could be to find the offending post and renumber it.