Review postgres

fix #1084 so it merges cleanly and minor doc fix