SDEs and posterior sampling