Switching database to postgresql