It could be that some cleanup is needed post-migration, if you check the official upgrade topic here and read the first post closely, there are details and recommended steps – PostgreSQL 12 update
2 Likes