Many people don't understand batt type or foam insulation...it slows the transfer of heat, it does NOT stop it. The better the insulation, the longer it will either keep heat in or out, depending on which way it is traveling. There is no physical thing called cold, it is a lack of heat. The ice chest doesn't keep the cold in, it slows the heat from getting in, and the same thing with your pipes. The best place for pipes in an attic are close to the ceiling, so the heat or lack of it in the summer with a/c can influence the pipes most.
In hot climates (or even in New England where I live), one of the cheapest yet most effective means of lowering your attic temperature is to put a reflective barrier on the roof joists (there are numerous brands, the one I used was foil-faced nylon reinforced kraft paper in a 4' wide roll). I have noticed an average 20 degree drop in attic temperature since I put it up about 5-years ago. My ceilings in the summer went from feeling hot like a radiator by the end of the day to feeling the same as an interior wall. Money well spent, and cheap, too. A radiant barrier reflects up to 95% of the incident long-wave radiation back where it came from. A properly engineered metal roof will do the same thing, and probably never need to be replaced again, even in hurricane country.