#mastodon + #postgresql: after recent upgrade, I wanted to try out /pghero only to find out it's broken with the following error in logs:
ERROR: column "total_plan_time" does not exist [1]
The supposed fix is to run the following command:
ALTER EXTENSION pg_stat_statements UPDATE;
Which only works under the "creator" creator account, so I ran it under "postgresql" role instead of "mastodon".
However, even after running it, it still didn't work...
It turns out that the extensions are maintained *per database*, so while I was upgrading the extension version in "postgres" database, I was *not* upgrading the extension in "mastodon" database.
After checking the extension versions in both using "\dx", the fix was simple - use the "postgres" user in the "mastodon" database and voila, it worked!