Those of us living next to a large enough body of water in New England are accustomed to the presence of outfall pipes that, from time to time, spill untreated sewage into our waterways.

Even those unaware of these pipes live with them and their occasional discharge, which carries dangerous pathogens. These are your grandfather’s infrastructure — relics of a time when the idea of tipping into local waters during periods of heavy rain was both legal and acceptable, if not especially pleasant.

Dozens of these outfalls survive today, despite years of work by local leaders and clean water advocates to contain them, under pressure from the U.S. Environmental Protection Agency and the Clean Water Act. The Greater Lawrence Sanitary District has five — four of which spill into the Merrimack River and one that flows into the Spicket River. Haverhill has 15 on the Merrimack and Little rivers.

Making these outfalls go away is not easy or cheap. Just ask citizens of Gloucester who have spent millions of dollars to uncouple the city’s sewage and stormwater systems, with the goal of ending the use of five overflow pipes into Gloucester Harbor for untreated sewage.

Still, the fact these overflows exist doesn’t mean we should accept their use, or the occasional mixture of vast quantities of untreated sewage into our rivers and harbors. If anything, we should be taking every step we can to avoid those occurrences.

One such step is now being weighed by lawmakers. It involves the assurance that treatment plants have backup generators, lest a power outage causes them to dump untreated sewage into a nearby river. At many plants, doing this means spending hundreds of thousands of dollars on generators — an expense that doubtlessly will get passed to customers at the other end of the household drain. It’s a well-justified cost, especially given the alternative.

“We need to do whatever we can to help prevent these kinds of spills in the future,” Rep. Linda Dean Campbell, D-Methuen, said during a Statehouse hearing this week.

The worst-case scenario that illustrates the need for a generator happened when the Greater Lawrence Sanitary District’s treatment plant in North Andover lost power in a storm last fall. An untold amount of sewage — it was at least 8 million gallons, according to one estimate — spilled into the Merrimack. The sanitary district for a half-dozen communities typically rents generators when needed. The problem with that, as shown last fall, has to do with timing and weather. No one can predict a power failure.

Such spills because of power loss may not happen often, and treatment plants are already required to have two sources of electricity. But, as noted in this week’s hearing at the Statehouse, those sources aren’t always reliable.

Cheri Cousens, executive director of the Greater Lawrence Sanitary District, told lawmakers the operators of the plant support the idea, though it’s not one that can happen immediately there given budgetary constraints. This problem certainly wasn’t created overnight, either.

Still, more than 300 outfall pipes actively dump into the state’s major bodies of water, from Boston Harbor to the Chicopee and Connecticut rivers. Those of us living in cities and towns without an outfall pipe still must face the consequences of the state’s major water resources being used as a collective drain.

Forcing treatment plant operators to install and regularly test backup generators — and giving them a deadline to install them — certainly won’t end the use of these outfall pipes. But it’s a reasonable step toward ensuring that we don’t use them if we can avoid it.

Recommended for you