Did early farmers have some sort of pesticide? Did they deal with it at all?
I'm sure various methods were employed by different cultures across the world, but the one I do know about are Native American farmers using tobacco as a pesticide. They would light it and spread the smoke across plantings of corn, beans, and squash to deter pests from consuming the crops.
The three sisters companion crop method mentioned above (corn, beans, and squash) also helped each other by deterring pests, ex the abrasive nature of the squash leaves turned away hungry foragers.
I'm positive other contributors have other examples from different cultures but this is just one.