so the upgrade patch from mastodon 2.3.3 to 2.4.0 has a db migration that adds an index to each single post and removes another
the upgrade patch from mastodon 2.3.3 also has a subsequent db migration that reverts this
both need to run
both need to update your instance's db
for each single status in it.