initial steps to use postgres for all stages