finish switch to postgres