We model the optimal reaction of a public PAYG pension system to demographic shocks. We compare the ex-ante first best and second best solution of a Ramsey planner with full commitment to the outcome under simple third best rules that mimic the pension systems observed in the real world. The...