There are some preliminary signs of progress in Iraq, which prompts the question of what Obama should do if things are going relatively well there when he takes office. (There's less of a question for a McCain presidency, because he has essentially committed us to staying there.)
On the one hand, Obama clearly will have a mandate to pull the U.S. out sooner rather than later. Presumably anyone who thinks we should stay will vote for McCain.
On the other hand, every indication is that Barack Obama is a man who deals with the world as it is, not as he wishes it to be. And as much as he might be tempted to pull out anyway, I suspect he'll evaluate conditions on the ground and calibrate any pullout to match the situation.
Is does not necessarily follow, by the way, that we should stay if things are going well. Or leave if they are going well. The key thing is to determine why things are going well. IF they are only going well because of high U.S. troop levels then pulling out quickly is obviously a poor choice. But if the improvement is largely because of Iraqi choices, then leaving without unnecessary delay will help.
The one thing I don't think Obama is interested in is creating a permanent U.S. presence a la Germany or Japan after World War II or Korea. It's likely that any Iraqi government strong enough to govern will ask us to leave. A long-term presence in an Arab country seems to cause more trouble than it is worth. Sticking around in Saudi Arabia has caused no end to our troubles, for example. Better an off-shore naval presence or small special forces bases in small, friendly states like Kuwait.