记一次数据迁移的问题
数据库连接中断
迁移数据库之后发现一个问题,这个问题会偶尔出现一次
polardb FATAL: terminating connection due to administrator command
出现的这个问题是数据库连接被中断了
由于当时使用的druid的版本是1.1.20
官方推荐增加dbType配置
虽然dataSource.setDbType 会自动识别,单这不是我想要的
dataSource.setDriverClassName("com.aliyun.polardb.Driver");
#dataSource.setDbType("polardb");
dataSource.setDbType("postgresql");
数据类型转换问题
另一个问题是, 这是驱动中的代码
Blob类型的数据当成了Long 类型处理
需要在数据库连接加上配置解决
blobAsBytea=true
参考
https://help.aliyun.com/apsara/enterprise/v_3_13_0_20201215/rds/enterprise-user-guide-polardb/polardb-compatible-with-oracle-jdbc.html?spm=a2c4g.14484438.10004.2#title-xdb-zyb-m8i