database with postgres wrapper fix