Every pension system has different rules.
Fortunately, I'm in a state with a conservatively managed fully-funded pension system. 9th largest in the country, 25th largest in the world. And almost all county and municipal employers participate in the same system so your pension travels with you as long as you stay in government service (although I did almost 32 years with the state)
In our system, I think you vest after 5 years. 2% a year based on the average of your highest three years of income (regardless of when that might happen) and overtime counts in the calculation. No pensions paid out before age 50. (So, if you worked 20 years, you'd retire at 40% of the average of your three highest years) I retired at 53 (about a year and a half earlier than I had planned) when I figured out that the base pay of my pension and the base pay of my regular employment were about the same.
Whenever a new person started, a few of us would sit them down and try to convince them to begin participating in the deferred compensation program (a 457). About half of them did. We now have the option to contribute extra directly to the state pension fund if you choose.
In any case, the original poster said that he was in his late 30s. If he maintains his physical condition, he could put in 20 years or so and retire, depending upon how the pension systems work in NOVA where he's at.
Like anyplace else, it's all about who you work for and who you work with. Being a cop is still a damn good job if you get into the right situation. AND it's best if you don't chase the illusion of perfection -- all jobs will have issues and some of the issues that law enforcement has now were issues with the pyramid guards of ancient Egypt a thousand years ago, too.
If you work someplace where overtime is factored into your pension calculation, you don't have to be so focused on trying to promote rapidly because you can make the same amount of money as a sergeant or lieutenant IF you are willing to be an overtime whore. Of course, not everybody wants to do that.
And in law enforcement FIGURE OUT WHAT YOU REALLY ENJOY DOING, AND THEN DO THAT. I've known lots of guys who made sergeant and say "the most fun I ever had was when I was on patrol on nights", or guys who promoted to lieutenant who will say, in retrospect, that they should've stayed a sergeant. It all depends on the individual, their interests, and how things work in THAT particular agency.
I am always amazed, when there are discussions like this, how much things can be significantly different from state to state and even agency to agency within the same state.