https://github.com/matrix-org/synapse/blob/master/docs/postg... has the details.
Fwiw, we're addressing the sqlite issue by stopping servers from federating for now if they are on sqlite (https://github.com/matrix-org/synapse/pull/5078). Sorry you got bitten by this.