Finish switch to postgres