Posterior Sampling when the Normalizing Constant is Unknown