kore postgresql dependency fix

This makes postgresql an optional dependency.