Fix bug in postgres data path