Migrating mattermost database to new mattermost server

Can you try enabling the logging_collector setting on your Postgres instance? Here’s a tutorial on how to find your configuration file and what fields to set: https://chartio.com/resources/tutorials/how-to-log-queries-in-postgresql/.

With that feature enabled, restart your Mattermost service, and you should have a more detailed log that we can use to track this problem down.