I heard the expression as a youth in the Tidewater section of Virginia. In elementary school in the 1940s we were taught about pecks as a unit of measurement but it was not in practical use. I supposed it had been actually used in former times when the expression was coined.