#mastoadmin This happened to me with a live server, and I've verified it experimentally, and so I pass it on to you:
If you're upgrading to Mastodon 4.3.x, it no longer supports Postgres 9, and it's tempting to export your PSQL 9 database and import it directly into a more modern version like 12 or 16; this is supposed to auto-convert it to the new format.
Please don't. Step upward by one version at a time. The direct upgrade trashes Mastodon's performance somehow.