The levels of heavy elements in stars are the product of enhancement by previous stellar generations, and the distribution of this metallicity among the population contains clues to the process by which a galaxy formed. Most famously, the G-dwarf problem highlighted the small number of low-metallicity G-dwarf stars in the Milky Way, which is inconsistent with the simplest picture of a galaxy formed from a closed box of gas. It can be resolved by treating the Galaxy as an open system that accretes gas throughout its life. This observation has classically only been made in the Milky Way, but the availability of high-quality spectral data from SDSS-IV MaNGA and the development of new analysis techniques mean that we can now make equivalent measurements for a large sample of spiral galaxies. Our analysis shows that high-mass spirals generically show a similar deficit of low-metallicity stars, implying that the Milky Ways history of gas accretion is common. By contrast, low-mass spirals show little sign of a G-dwarf problem, presenting the metallicity distribution that would be expected if such systems evolved as pretty much closed boxes. This distinction can be understood from the differing timescales for star formation in galaxies of differing masses.