  Aim of this paper is to prove the second order differentiation formula along
geodesics in compact $RCD^*(K,N)$ spaces with $N<\infty$. This formula is new
even in the context of Alexandrov spaces. We establish this result by showing
that $W_2$-geodesics can be approximated up to second order, in a sense which
we shall make precise, by entropic interpolation. In turn this is achieved by
proving new, even in the smooth setting, estimates concerning entropic
interpolations which we believe are interesting on their own. In particular we
obtain:
  - equiboundedness of the densities along the entropic interpolations,
  - equi-Lipschitz continuity of the Schr\"odinger potentials,
  - a uniform weighted L2 control of the Hessian of such potentials.
  Finally, the techniques used in this paper can be used to show that the
viscous solution of the Hamilton-Jacobi equation can be obtained via a
vanishing viscosity method, in accordance with the smooth case.
