Accuracy analysis of a spectral Poisson solver