Galvanized water pipe is most prone to rusting on the horizontal surfaces (such as under a floor) versus vertical surfaces (running up a wall) and it corrodes from the inside out. Some rigid plastic systems have been recalled, while others have fared very well.
The most reliable types seem to be made of copper, but again there can be issues to check: are the hangers plastic lined? Are there any lead solder joints? A good home inspector can help you identify any problem areas before you buy. There are several reputable inspectors in our area that I would be happy to refer.