First of all, are you talking a REAL 5 gallons? because a lot of times when you go to buy pots they call the pot a 1 gallon, 3 gallon etc and so forth ,but in actuality it's about 1/2 a gallon or significantly smaller than what they call it.
And alot of the pot size depends on the size of hte plant. if you're growing with genetics that only go so far as 4ft, you can get away with a smaller root base.
But in short, i usually like to go about 70 L, which is about 18G and i've never had a problem with 8ft girls. So you should be able to get away with 12G depending on yoru plant size, but i wouldnt want to work with a 5 gallon pot. I would bet that you will see rout bounding and stunted growth. pm me if you need anything else.
mt