The first aims to take the pressure off poor and middle-class families by reducing what they pay for rent. The second aims to protect cities against developers who would bulldoze a neighborhood without a second thought.

The problem for New York is that when you restrict supply, you make the neighborhood more expensive.

So it’s hard to see how the mayor is going to make good on his promise to create 80,000 new affordable units if he continues to wall off areas to new building by landmarking them.

That’s the finding of a new study by the Real Estate Board of New York, which says landmarking can create “unforeseen barriers to ­development.”

According to the study, of the 35,000 units of affordable housing built throughout the city between 2003 and 2012, only 100 were located in landmarked districts. Of those 100 units, all but five were part of a subsidized project in The Bronx.

No affordable housing at all was built in the historic districts of Brooklyn, Queens or Staten Island, according to the study.

But Manhattan is where it really comes into play, because more than a quarter of the island is now landmarked.

No one should be surprised at the study’s conclusions. Almost by definition, landmark preservation most benefits the people who already have places to live, who do not want their neighborhoods changed and who can afford the higher costs preservation ­imposes on a community.

Add to this the extremely vague definitions of what constitutes a building or area deserving landmark status, and you have a recipe for some very dubious claims.

When Midtown East was up for development, developers and landmarkers were wildly apart in their estimates of how many buildings should not be touched.

Landmarking has an important role in this city, and over the years it has helped preserve much of our city’s history.

But New Yorkers have to live somewhere, too, and in this city we are already paying some of the highest rents in America. What we need is accommodation, not ideology.

Because the clash between landmarking and affordable housing should remind us that every decision has its costs — and every real solution means making tradeoffs our politicians like to pretend do not exist.