Until all the high-level memoirs are written, we probably won't know just how close President Reagan came to naming someone other than Paul Volcker to the chairmanship of the Federal Reserve Board. But it was a nip-and-tuck affair, and allowed to drag on in unseemly fashion.

In the end Reagan, recognizing Volcker's "world-class" status and talent, made a good decision. Despite the reservations of some of his close political advisers, the president took note of the groundswell of support for Volcker from a larger slice of public opinion, here and abroad. For that, Reagan deserves a lot of credit.

It's such a sensible decision that one should be wary that Reagan may balance things out with his next big appointment--say a Moral Majority- backed candidate for the Supreme Court.

I suspect that Reagan recognized in Volcker a fellow pragmatist who knows when to abandon a losing policy. Volcker did so last year, when the international debt crisis worsened: he junked the monetarist line that had, in fact, deepened the recession. More than any other single factor, the Fed's shift in policy last year postponed a world debt crisis, by lowering interest rates.

"The reason for sticking with Volcker," says a Cabinet officer who had counseled the president to do just that, "was twofold: anyone else would have to work at acquiring the reputation that Volcker already has. And second, he has more credibility on the international scene than anyone else.

"And let's face it: if the economy needs a shot in the arm next year, Volcker can manage that better than anyone else because he has a track record for fighting inflation."

Although the reasons for his reappointment seem ever so logical now that the verdict is in, the anti-Volcker sentiment within the White House at one point was virulent. Largely, it came from presidential sycophants who argued that for Volcker to be "independent" is one thing, but being continuously critical of administration policy is another.

Now, of course, Reagan and Volcker have to face enormous economic challenges together, here and abroad, for the next year and a half. "I believe we now have a rare opportunity to achieve sustained growth on a firm foundation of stability," Volcker said after learning of his reappointment. Nice words, but it's easier said than done.

With enormous budget deficits certain, and little willingness of either party to make dramatic budget or tax changes that will stem the flood of red ink, it will once again be the task of monetary policy to deal with inflationary pressures.

Reagan, Volcker and the nation have been able to enjoy something of a honeymoon over the past few months because inflation and interest rates have come down, while the economy has been operating below par. But as experts like Henry Kaufman suggest, Volcker and the Fed will almost certainly have to allow interest rates to rise in the next year or two, given the deficit problem combined with economic recovery.

Thus the inevitable clash between the easy Reaganomics fiscal policy and a restrictive Fed monetary policy that dominated events for most of 1981-82 is bound to surface again. The president is gambling that such a collision won't happen before the 1984 election.

But if it does, the second-guessing on Volcker's reappointment will hit a crescendo, even though the result would likely have been the same if the chairman had been named Alan Greenspan, Paul McCracken, Preston Martin or John Doe.

From the president's point of view, the retention of Volcker in what may be the most important economic policy-making job in the world was basically a political rather than an economic decision. Greenspan or the others almost certainly would have followed out Volcker's anti-inflationary policy with much the same tools Volcker is employing.

Some White House aides felt that Volcker was too openly hostile to Reaganomics, too willing to urge Congress to chip away at the revered supply-side tax cut. They also laid the blame for recession, which gave the administration a bad press, directly at Volcker's door.

Whatever one thinks of "Volckernomics"--he's certainly made mistakes --the man is a true patriot: at the crest of his credibility in the financial world (which could easily and quickly deteriorate), he could have commanded a high private salary, shucking at the same time the frustrations of dealing with a less-than-friendly White House, a difficult Congress and the multiplicity of knotty domestic and international economic problems.

His desire to stay in the poorly paid Fed job a while longer is a testament to his belief he's doing something important for the country.