When you look at total comp (vacation, hours worked, benefits, job security), the federal government is competitive except against top tier tech companies.
My sister and I are at similar career paths. She works as a principal engineer at a big software company. I work for a state .gov. She makes more, but my costs are well defined... no $10k health deductible, etc.
The present value of my pension is the equivalent to her performance stock grants, except they are near zero risk.