This will help to avoid issues where the database cluster directory is left in an inconsistent state.