moving to postgresql as main database