Michael Bostwick and Dwight Gayle scored in either half to put an end to Cardiff's perfect 10-game home record, despite Rudy Gestede's late strike. The league leaders had 20 efforts at goal and manager Mackay believes that dismal conversion rate was a major factor to their surprise loss at the Cardiff City Stadium.
Mackay said: "There are no easy games in this division and everyone can beat everyone - we are disappointed to lose. On another day Heidar (Helguson) could have scored five. We had 20 attempts on goal, did everything but score and weren't clinical. That wasn't good enough.
"We were beaten and can play much better. We want to be as consistent as possible and the league table shows that, but we have to work hard every week. We were bound to lose at home at some point, but full credit to Peterborough. They deserved the win."
Peterborough also ended Hull's 100 per cent streak at the KC Stadium in September with a 3-1 win, but this victory in the Welsh capital ranks as the biggest surprise of the Championship season.
It was Posh's first success since October 27 - but it could have been more had striker Gayle been able to convert numerous second-half chances.
Proud Peterborough boss Ferguson said: "We have beaten the best team in the league and also won at Hull so that shows we can beat any team in this league. It's a very good day. But we haven't been consistent enough this season.
"I have always believed in the players and maintained the confidence that we can get the job done - but we need to produce consistent performances.
"We played very well but we did so last week. The difference was we defended well too.
"We stuck to the game plan and deserved the win but we didn't finish them off. We were hanging on a bit at the end. But if we continue to perform like that we will be fine in this league."