How do you define longevity in this instance?
Same question, how do you define life expectancy?
Fair question as both are related to lifespan.
Strictly, I'd use longevity when referring to populations in historic periods, such as the average lifespan of people in the periods below. Note the drop at the start of the neolithic which is what spiker refers to.
Taken from The Neolithic Revolution and Contemporary Variations in Life Expectancy (Galor & Moav 2007)
As the lifespan of individuals decreases, paradoxically over time longevity increases because of genetic adaptation to selective pressures. Some people cannot live side by side with domesticated animals and die because their immune systems cannot combat the zoonoses. On the other hand, some people can cope with this so they don't have the disadvantage of dying but do gain the benefit of extra nutrition. Thye are better fed and live longer because they can benefit from a ready supply of food. People today can reasonably expect to live until their 70s. Amongst the San however, it is between 40 and 50. This is better than the 30 or so of the mesolithic and due to the fact that they are not entirely hunter gatherers anymore and have adapted genetically themselves. In fact, they are a diverse population in this respect.
Hence my interjection at the point where the claim was made that
"Agrarian societies have worse health than hunter gatherer and pastoralist societies - this can be seen clearly from skeletal analysis." with my reference to
!Kung nutritional status and the original "affluent society"--a new analysis and their observation that
"the few remaining foraging groups studied in the 20th Century are unlikely to serve as the ideal models of that ancient way of life."
These matters are invariably rather more complicated than the simplistic way in which they are presented. Overall fertility rates and infant mortality rates are too, important factors and human populations need to adapt to the changing circumstances. Local food sources are another genetic adaptation. For example, lactase persistence amongst nomadic Bedouin populations was a genetic response to the availability of camel milk whereas the northern european and sub saharan african genetic adaptations, were due to cattle, though via different polymorphisms.
For an overview of some of the considerations, see
A bioeconomic view of the Neolithic transition to agriculture which is readable until the mathematics.