We just upgraded from 2.9.0beta8 to latest and notice quite a bit of slowdown in some areas like the initial load, or viewing some longer topics.
What stands out is the following query, which takes over 90% of the processing time of some page loads. I can’t quite understand what it does or if there’s any feature we can disable to avoid this?
Did you vacuum and rebuild indexes when you upgraded to pg13? You might try that on any case.
There is another topic about discourse not working on two queries where the person is running on a Raspberry Pi (I can’t find it right now). It could be related.