The deficit hit an all-time high of $1.4 trillion in 2009 and remained above $1 trillion for four straight years as a deep recession and weak recovery pinched government revenues and forced higher spending for such programs as food stamps and unemployment benefits.