I’m Dying Up Here almost didn’t survive to a second season.

Dave Flebotte, who with Jim Carrey created the Showtime adaptation of William Knoedelseder’s best-seller about The Comedy Store in the 1970s, told me over the phone last week that when Showtime gave them “a month to come up with what we would do in a second season,” they explored options before deciding “we wanted to do a time jump, so it wasn’t everybody trying to get out from under the rock.”

They also introduced two new main characters.

Brad Garrett’s Roy Martin is “the Rodney Dangerfield kind of guy, who was a big influence on Jim’s career.” As for Dawn (played by Xosha Roquemore), “Dawn was to me and (EP) Mike Aguilar as a LaWanda Page character,” Flebotte said. In real life, Page found fame as Aunt Esther on Sanford and Son.

Season one’s cast already included three regulars Erik Griffin (Ralph), Al Madrigal (Edgar), Andrew Santino (Bill) who put out their own Showtime stand-up specials in 2017 to complement the series. Along with them, Jon Daly, Dom Irrera, Rick Overton and Cathy Ladman, the show has added even more real-life comedians to the mix. Among them: Dana Gould, Andy Kindler, Paul Provenza, Earl Skakel, Adam Newman and Joey “Coco” Diaz.

“I would love to keep bringing back comedians that I loved,” Flebotte said.

And he readily admits that real-life stand-up experiences sometimes influence the throwback bits in the series. Such as the moment in season two when Eddie goes off on a heckling crowd in Pasadena, which is based on one of Flebotte’s “favorite clips of all time,” when Bill Burr went off on an entire arena audience during a 2006 Opie and Anthony tour stop in Philadelphia.

“Obviously (what we did) is a poor man’s version of that. What bill did is in defiance to the audience…this is just a learning moment from Roy to Eddie,” Flebotte said. “We used it for story purpose, character growth.”

Another comedy bit this season saw young Adam riffing onstage about why God talked to Noah instead of to a woman.

That immediately made me think about Bill Cosby’s iconic Noah routine. But Flebotte hadn’t thought of that at all. (If he had, perhaps he could rewrite comedy history on TV so other comedians get to do all of Cosby’s bits and we can remember them differently!)

One sticking point among critics and comedy fans from the first season was whether or not Melissa Leo’s Goldie was supposed to represent Mitzi Shore from The Comedy Store. Especially when Goldie mentions Mitzi and the Store during a season-one episode.

Shore served as the den mother and foil in Hollywood’s comedy scene in the 1970s, culminating in the strike against her club that provides the climax and the crux of the book that inspired this series.

“It really came down to the casting of Melissa Leo,” Flebotte said. “In the pitch when we sold it, we were talking about a woman 40, 42 years old, and then when Melissa got added to the mix, it got more interesting to have this different relationship. And I didn’t want to write Mitzi.”

Leo is 57.

“It’s obviously inspired by Mitzi, but we wanted to make her different. Mitzi slept with the comics, partied with the comics. Goldie is more maternal, business-oriented, doesn’t get involved with the comics on an intimacy level. There was no universe where I saw (Goldie) sleeping with another comic. She’s a formidable force, but she has boundaries.”

Those boundaries still ultimately lead to a walkout and strike by the comedians, as previews for the season finale tease.

The second season takes place in 1975, as evidenced by Cassie auditioning for a brand-new NBC late-night show from Lorne Michaels (Saturday Night Live). The Comedy Store strike didn’t happen until 1979.

But season three isn’t a given for I’m Dying Up Here.

“Sometimes you have to accelerate a little bit. You could be saving it for a season 3 that will never happen, sometimes you have to put it on the table now and introduce it,” Flebotte said. “I would have loved to have another year of struggle and ease into it.”

So the strike is happening. Now.

Having Carrey starring on Showtime doesn’t necessarily guarantee renewal for his other series, Flebotte maintains. “I don’t think it helps us get a third season or anything,” he said. “It’s really eyeballs. And we need more of them.”

I’m Dying Up Here’s second-season finale airs this Sunday on Showtime.