"I was a bit fortunate to win that first set but I played okay and I fought extremely hard".
Roger Federer conceded he had more than his fair share of good fortune in his Shanghai Masters win over David Goffin.
Pospisil failed to capitalize on five set points in the first set, including two chances in the tiebreaker.
Djokovic said that he is fully recovered from a shoulder injury. He reached his first Grand Slam final at the U.S. Open, and then won titles in Cincinnati and St. Petersburg.
The Canadian, who had dismissed the United States' Frances Tiafoe 6-4, 6-2 in the first round, was hoping to go one better than his compatriot Félix Auger-Aliassime, who had fallen to an agonizing 7-6 (3), 7-6 (3) defeat to former junior rival Stefanos Tsitsipas of Greece earlier in the day.
Medvedev - another of the next generation - sent down 12 aces to help see off Fognini and said: "I don't know what happened, my serve was crushing it".
The 21-year-old has now defeated all the "Big Three" this year - Djokovic, Roger Federer and Rafael Nadal - and faces another major talent in his Saturday semi-final against 23-year-old Daniil Medvedev. He would eventually take the second, closing out the match 6-3, 6-3.
The 38-year-old Swiss now faces Alexander Zverev after the German came through 6-0 7-6 (4) against Russian opponent Andrey Rublev.
"I never really felt like I had the upper hand over David today", Federer said.
I thought he took really a lot of good decisions, and he was super fast on his feet today, which I think made it really hard for me to get my freebies and winners off the baseline, because he was getting to all of them.
Another break followed as Djokovic raced three games clear and, though Isner regained some composure to stem the tide, he was no match for the top seed's unerring serve.
Berrettini outlasted eighth-seeded Roberto Bautista Agut of Spain 7-6 (5), 6-4.