changed postgres close to postgres commit