Add pg, add special case for empty db and heroku config