Open ylluminate opened 1 month ago
Should these discrepancies be resolved or addressed prior to fully trusting the migration to PostgreSQL
Hey @ylluminate you don't need to worry about this, I haven't came across any issues regarding to type casting. They are defined in the pgloader
load file. After the migration, you can consider using https://github.com/mattermost/dbcmp for 1-1 comparison. Though, you may need to exclude a few tables to avoid confusion as some tables may differ. See: https://github.com/mattermost/dbcmp
Thanks @isacikgoz - I appreciate your response and the helpful tool recommendation. The dbcmp tool looks particularly useful for verification.
Could you share which tables you typically exclude when using dbcmp? Since you mentioned some tables may differ, it would be helpful to know which ones commonly need exclusion to avoid false positives during comparison.
Also, I notice several JSON-related casts in the warnings (text->jsonb). Have you found these specific conversions to be consistently reliable in practice?
I think excluding db_migrations,ir_,focalboard,calls,systems
would make sense for setting the bare minimums. Also I'd exclude configurations
and related tables configuration_files
and db_config_migrations
if you are using config in DB.
Also, I notice several JSON-related casts in the warnings (text->jsonb). Have you found these specific conversions to be consistently reliable in practice?
Yes they should be pretty reliable from my experience, they are both text based but jsonb
data type adds more utility over JSON types built-in.
During the
pgloader migration.load
process, a series of warnings were logged related to type casting mismatches and missing constraints between the Mattermost source database and the target PostgreSQL database.These warnings indicate differences in data types, such as
varchar
totext
orsmallint
toboolean
, as well as missing foreign key constraints. Should these discrepancies be resolved or addressed prior to fully trusting the migration to PostgreSQL?Below is the log output in question: