We study a stochastic model for a target benefit pension plan suffering from rising longevity and falling fertility. Policies for postponing retirement are carried out to hedge the payment difficulties caused by the aging population. The plan members’ contributions are set in advance while the pension payments reflect intergenerational equity by a target payment level and intergenerational risk sharing by an adjustment. The pension fund is invested in both a risk-free asset and a risky asset. Applying the stochastic optimal control methods, we derive analytic solutions for optimal investment and benefit payment strategies which minimize the benefit risk. Besides, an optimal delayed retirement age which can hedge against the aging phenomenon under certain parameters is given. Therefore, it can provide a basis for quantifying the delay of retirement time.