precompile and switch database to postgresql