Usually medical specialty residencies are four years in length. The primary care specialties are normally considered Family Medicine, Internal Medicine, and Pediatrics - all of which are three year residencies.
For some loan forgiveness programs, you must be a "primary care specialty" to qualify for monetary and other incentives. They then go on to list psychiatry as one of these. Technically, though, it is a medical specialty.