update pg and set up db