Had a discussion at work about what data gitea puts into postgres. Kind of a scaling/sizing discussion. Mainly, the stateful info needs to be stored and it's not especially dynamic. (That's my short take on the findings.)
I found via google some useful information on seblab's blog: https://blog.seblab.be/
and I'm sure there could be a lot more. I like the way seblab sets up a problem/situation and works it out.