Government pensions, built into law and mostly protected from stock market vagaries, are the envy of the private sector.