“I’m 90 years old,” he said. His last day will be Dec. 31 — by coincidence, his 91st birthday.

Prospective jurors probably assume he is fearsome or forbidding. He said he had been walking around his office with a walker lately (but it was nowhere to be seen during two recent visits). And Madonna, who answered a summons from Mr. Goodman in July, said by email that Mr. Goodman was “chatty and full of stories,” so much so that he “could have been Woody Allen’s lost brother.” Of course, Mr. Goodman let her wait in his office to avoid gawkers in the jury assembly room.

Six mayors and seven governors have come and gone during his tenure, but Mr. Goodman has stayed on, spending more than half his life in a job he took as a steppingstone to a judgeship he never got. Had he stayed too long?

“No,” said Robert M. Morgenthau, who was elected district attorney when Mr. Goodman had been in his appointed job for nearly six years and who retired in 2009 when he himself was 90. “He did a great job, he never slowed-up, he was conscientious and reliable and well respected. He worked at every problem and solved it. He never said, ‘I can’t handle that.’ It was comforting to know he was there.”

Retiring sooner “would have set a bad precedent,” Mr. Morgenthau added.

Mr. Goodman, whose predecessor stepped down when he was only 80, began as a clubhouse politician — first as a Democratic district leader in Inwood, later president of his Democratic club and eventually assistant counsel to the majority leader of the State Senate. But by the 1990s, he had transcended the institution of politics and become an institution in his own right.

“A pillar of the courthouse,” said Judith S. Kaye, the state’s chief judge from 1993 to 2008.

He was 2 years old, maybe 3, when the courthouse where he holds court — the imposing New York County Courthouse at 60 Centre Street with the Corinthian portico that “Law & Order” made famous — was completed. (Some history books say 1926, some say 1927.) The rotunda inside was the setting for a reception for him on Wednesday.