The resignation of Gen. Stanley A. McChrystal from his post as head of allied military forces in Afghanistan and his replacement with Gen. David Petraeus, the man who was his superior officer, says many things — some of them reassuring and some of them worrisome.

The details of McChrystal’s offense by now are known worldwide: He permitted a reporter for the national weekly, Rolling Stone, to accompany him and his staff for an extended period. During that time, the general and his subordinates recklessly made many derogatory comments about President Obama, Vice President Biden, Ambassador Karl Eikenberry and other administration figures.

Those comments were dutifully printed by the magazine, and have ended McChrystal’s military career.

As they should have. No civilian commander-in-chief can permit military leaders to criticize them publicly without sacrificing their authority over the military, a central feature of our form of democratic government. McChrystal had to go.

But replacing him with Petraeus has the potential to be a mixed response. Petraeus, who headed Central Command, the headquarters covering the Mideast and Southwest Asia, wrote the Army’s field manual on counterinsurgency and is intimately familiar with Afghanistan. His appointment was met with near universal approval by members of Congress, and the confirmation hearings, which have been promised no later than Tuesday by Senate Foreign Relations Committee Chairman Carl Levin, are expected to be among the shortest ever.

However, there are some concerns. Petraeus collapsed from fatigue at a recent hearing before Congress, leading to speculation that his stress level was extremely high.

As the effort in Afghanistan reaches a critical stage, does he have the stamina to bring his expertise fully to bear on the difficult challenges that will have to be resolved?

And the Rolling Stone article exposed more than a lack of discipline among McCrystal’s staff. There is still strong disagreement among key policy makers about the strategy in Afghanistan, and replacing one of the policy’s architects with another one might not stop the backbiting on its own.

President Obama has promised that U.S. forces will begin to be withdrawn from Afghanistan next year, but without significant progress, that promise will be a hard one to keep.

The burden of fulfilling it now lies on the four-star-bearing shoulders of Gen. David Petraeus.