This article proposes a model for a defined benefit pension plan to minimize total funding variation while controlling expected total pension cost and funding downside risk throughout the life of a pension cohort. With this setup, we first investigate the plan's optimal contribution and asset allocation strategies, given the projection of stochastic asset returns and random mortality evolutions. To manage longevity risk, the plan can use either the ground-up hedging strategy or the excess-risk hedging strategy. Our numerical examples demonstrate that the plan transfers more unexpected longevity risk with the excess-risk strategy due to its lower total hedge cost and more attractive structure.