The Tour was only a few minutes into the 166-kilometre Stage 19, from Bourg-en-Bresse to Champagnole in eastern France, when the insect struck. Bora said it was a bee. Race organisers said it was a wasp.
His withdrawal left the Tour with 146 riders, 30 fewer than when it started nearly three weeks ago. It also dealt a blow to Sagan in his fight with Irish rider Sam Bennett for the green jersey.
It is awarded to riders who vacuum up the most points in sprints during and at the end of stages. Bennett wants to keep the jersey all the way to Paris, while Sagan wants to win it at the finish for an eighth time.
The damage was imemdiate as Bennett came home fifth in Stage 19, stretching his lead to 55 points over Sagan, meaning he now looks near certain to win if he makes it to Paris without incident.
The 28-year-old Pöstlberger was riding his third Tour. He also abandoned last year, on Stage 18.