President Obama pumpkin-picking in Virginia. (JASON REED/REUTERS)

Democrats currently control the state Senate by a tenuous 22 to 18 majority. If Republicans win three seats in the chamber on Nov. 8, they will control the governor’s mansion and both chambers of the key legislature in this all-important swing state. If they win two seats, Republican Lt. Gov. Bill Bolling will have the tie-breaking vote in the state’s upper chamber.

But control of the state legislature isn’t the only thing at stake. Gov. Bob McDonnell (R) has thrown himself into these races. President Obama , meanwhile, just held a bus tour in the Virginia, which is crucial to his reelection. A Republican win in 2011 would bolster the GOP going into both next year’s highly-competitive Senate race and the 2012 presidential election.

Brian Moran, chairman of the state Democratic Party, argues that individual state races don’t add up to a referendum on the president. “We have an election every year in Virginia, and each and every year they’re unique,” Moran said.

Democrats have tried hard to focus on local issues, including gun rights. Republicans have in turn tied each local candidate to Obama at every opportunity.

“Although these state Senate races mostly turn on local issues and personalities, overall anxiety about the economy and low support for a Democratic administration in Washington will have a significant impact,” said Mark Rozell, a professor of public policy at George Mason Unviersity.

Virginia independents have been shifting away from Democrats since 2009, when McDonnell was elected. While the state economy is actually pretty good — unemployment is 6.5 percent, well below the national 9.1 percent rate — polls show a general sense that Obama has not done enough.

“Clearly, I’m going to lose some Republicans who would have otherwise voted for me” because of the president, state Sen. George Barker, a Fairfax Democrat in a tough race, told the Post recently.

State Sen. Phil Puckett (D), from conservative coal-mining Russell County, said in a television interview that he would not endorse Obama for reelection.

Other Democrats, while not going quite so far, have distanced themselves from the president on various policies.

“Ladies and gentlemen, that is the canary in the mineshaft.” wrote former Democratic governor L. Douglas Wilder in a recent editorial.

Obama won Virginia by seven points in 2008, but his support there has been steadily eroding, and the most recent Quinnipiac survey found that a majority in the state did not think the president deserved to be reelected.

The GOP has focused on five swing seats, but Republican money has also poured into Democratic-leaning northern Virginia.

National interest is high on both sides. Presidential candidate Mitt Romney stopped by a GOP campaign office in Fairfax last Wednesday. Former President Bill Clinton held a fundraiser in McLean on Friday. Spending by both parties here in the past four weeks has reached over $6.4 million, with Republicans in the lead.

“We’ve had superior resources, the campaigns have been run extremely effectively, we don’t have the president hanging around our necks,”said Republican strategist Chris LaCivita, who is working on Republican Caren Merrick’s campaign for the open 31st district seat.

Even if Democrats hold on to power in the state Senate, as in West Virginia’s special gubernatorial election last month, it will be by running away from the White House.

Moran points out that the whole state is not competitive the way it will be in the presidential race — as he put it, “the battlefield’s a little different.”

No matter what happens next week, Virginia will be very competitive in 2012. The question is will Obama be a drag or a plus for the Democratic ticket.