(Money Magazine) -- With the stock market cratering, and once-venerable financial institutions biting the dust, you might be wondering about the safety of your traditional pension plan. I've got some good news and some bad news.

The good news is that the pension you've earned to date can't be taken away from you; it's protected in a host of ways. The bad news is that if you're one of the lucky 30 million American workers still covered by an old-fashioned pension, the odds are pretty good that your company will jettison the plan before your career is over.

Here's what you need to know:

The ground rules

Traditional pension plans give you a guaranteed annual payment upon retirement, based on your final average salary and your years of service. Your company puts up all or most of the money, and unlike the case with a 401(k) plan, the benefit you accumulate under a traditional pension can't be demolished by a plunging stock market.

Even when markets are tanking, as they are today, corporations are required to keep their defined-benefit pension plans well-funded. Back in 2006, Congress passed legislation, called the Pension Protection Act, that put in strict new rules dictating how much cash a corporation must inject into its pension plan each year to keep it healthy.

Once your pension is "vested" - which generally happens after you've been on the job for five years - you're legally entitled to a payout when you retire. Even if you quit your job or your company discontinues its pension plan, you'll be entitled to the pension you earned up to that point. You'll usually have to wait, though, until you hit the plan's eligible retirement age (age 55 in most cases) to collect it.

Even if the worst-case scenario plays out and your company goes bankrupt, you'll likely still collect all or most of the pension you've earned to that point. Corporations are required by federal law to pay premiums to the Pension Benefit Guaranty Corp., the government agency that steps in to provide promised benefits to the employees of bankrupt companies.

The benefit amount that the PBGC covers is set each year by Congress - the maximum benefit for 2008 is $51,750 annually, or $4,312 a month, for someone who is retiring at age 65; the benefit is lower for people who retire earlier than that.

The deep freeze

In truth, the biggest risk you face is that your company will simply discontinue, or "freeze," the pension plan moving forward. If that happens, you'll be entitled to the pension benefit you've earned to date, but you won't accumulate any more benefits moving forward.

Traditional pension plans are a risky financial proposition for employers: If the plan's assets don't generate enough income on an annual basis to pay for the retirement benefits earned by workers, the employer must make up the shortfall.

That means diverting cash flow from other uses like shareholder dividends, debt repayments and investments in new operations. Most pension plans have the majority of their assets invested in stocks, so the brutal market we've experienced this year will undoubtedly require companies to cough up more cash than usual.

In recent years, a growing number of big companies, including IBM (IBM, Fortune 500), Verizon (VZ, Fortune 500) and Hewlett Packard (HPQ, Fortune 500), have decided to freeze their pension plans and put their workers into a 401(k) plan. The consulting firm McKinsey estimates that by 2012, 50% to 75% of all corporate pensions will be frozen by 2012 (compared to about 25 percent in 2007).

The problem with a freeze is that your pension benefits are forever stuck at their current level.

Let's say, for instance, that you're 50 years old, you've been with your employer for 20 years and you've so far racked up a pension equal to $2,500 a month, payable at retirement. If your company didn't freeze the plan, your monthly benefit would continue to grow with each additional year you remained on the job.

By age 60, for example, your pension would likely be at least double what it is today. But if your company froze the plan today, the $2,500 a month would be locked in - that's what you'd get at retirement, no matter how much longer you stayed on the job. And, of course, the purchasing power of that $2,500 would be seriously eroded by inflation by the time you retire.

State and local plans

So far, I've been focusing on corporate plans. If you work for a state or local government, you're at much lower risk. The rules governing corporate plans do not apply to public sector pensions, which are typically protected by state law and backed up by tax revenues.

In the public sector, pension freezes for existing employees are incredibly rare, thanks mostly to the presence of strong unions that represent teachers, police, firefighters and other government workers.

About 90% of all state and local workers are currently covered by a defined benefit pension plan, a proportion that has barely budged over the past two decades.