Leaking main line inside house

So the water comes in my house here.
The red knob shuts the water off to everything in the house. Before the knob you can see the connection with the small pipe
Then you can see the small pipe that goes around the back of the room in the corner
Then that pipe goes into the condensation line for the AC system
The condensation line exits out the back of my house. Now my question is the little pipe that runs into the condensation line has water running out of it and that water is coming out of the back of my house. When I turn the main off to the house it stops the water from leaking. What is this pipe for? How can I stop the water from coming out of it?

You need a pressure gauge. This sounds like you have a closed system which causes the T/P valve on the water heater to open to relieve the excess pressure caused by the water heating and no place for the expansion to go. Just a quick basic explanation may help you understand. A closed system exists when there is a check valve in the water supply. It may be in a pressure regulator valve or it could be in the water meter. When the water heats in the tank, it expands quite rapidly. The expanded water can not be absorbed by the water main, so the pressure rises in the tank and trips the T/P. This prevents the water heater from exploding. To deal with this, a thermal expansion tank is added between the pressure regulator and water heater to provide a temporary home for the expansion. An inexpensive pressure gauge attached to a hot water faucet will demonstrate this quickly and graphically. The T/P valve is working exactly like it is supposed to do. There is a video floating around somewhere that shows what happens when the T/P is wired closed. The resulting explosion looks like a bomb...it's no joke.

A pressure relief valve like that could be used as a poor-man's pressure reduction valve, but a PRV doesn't dump water to reduce the pressue, it changes it mechanically via internal valve mechanism.

Wheter you have a closed or an open system is somewhat irrelevant - the valve is either doing what it was designed to do - open if the pressure exceeds its setting, or it has failed, or your static pressure is now higher (maybe the city put in a new water tower or pump station).

As said, the easiest thing to do to check things is to pick up a $10 or so pressure gauge. Find one that has a second hand that acts like a peak reading indicator (a tattle tale). You can find them with a hose connection, and screw it onto say the WH or a hose bib, or say the washing machine supply. Check the instantaeous pressure, and leave it connected for say 24-hours to catch any peak readings. Anything steady over 80psi should have a PRV added. Peaks above that not caused by a closed system would also require one. Peaks above that caused by expansion means if you do have one, your expansion tank is shot, and you need a new one, which is also required on a closed system (a prv makes it a closed system as would a check valve that the city may have on your meter or supply line).

The pressure relief valve may still have a tag on it indicating the pressure it will open, or it may also be adjustable.

If you have a closed system, (essentially, a check valve so water cannot be pushed back into the municipal supply), then you also need an expansion tank to account for the fact that heating water causes it to expand. Pipes aren't very elastic and water doesn't really compress, so a little expansion will cause the pressure to rise quite a bit. A water heater will have a T&P valve that typically would open in this situation, but if the pressure relief valve opens first, then the T&P may not reach the point where it will open (typically around 150psi).

Question for Jim and Gary: Isn't that thing right before his water meter a pressure reducing valve? Doesn't that kind of answer the question?

Or maybe not: our licensed master plumber stood in my basement a few months ago and told me that the PRV didn't make it a closed system and so, no, I didn't need an expansion tank on the water heater.
"But that thing right there is a pressure reducing valve?"
"Absolutely. And there's your pressure gauge."
"Right. But...so we have an open system?"
"Absolutely."
"So any expansion gets picked up by the city water main?"
"Correct."
Okay. And the pressure shown on the house side of the PRV is consistently between 55 and 60 any time I have looked at it. Certainly, the relief valve on the water heater has never tripped (although I'm not sure I want the system pressure ever to be up to the point that it would), but I find the whole thing interesting given that it has repeatedly been said on here that

"Pressure Reduction Valve means Closed System which means you Need An Expansion Tank".

Is there some special exception to this rule for installations done in the 1950s? Certainly, the diameter of copper pipe that is used throughout the system seems significantly-greater than what I see in most photographs posted here. That shouldn't make any difference to the logic stated above, but do older PRVs leave the system open?

Just curious.

Oh -- I didn't notice it when looking the first picture, but in the second picture, isn't that a backflow preventer between the water meter and the pipe that has the pressure relief valve on it? So I guess regardless of the PRV, the system in the pictures would be a closed system, no?

I am not an expert on PRV history, but what I have learned on this forum is that until fairly recently, PRVs had a check valve built in so they created a closed system. Today, some of them have a bypass so these do not create a closed system. To further confuse this issue, some cities now are installing meters that have a check valve to prevent possible contamination. Essentially, a back flow prevention device. I don't know how wide spread this is, and I have not heard of cities retrofitting with them, just new construction. If the T/P is not opening during water heating, I would say the system is open. I had a fairly steep learning curve on this when I installed my PRV several years ago. The T/P opened within seconds of the water heater kicking on. I replace the T/P (twice) before getting on the forum and learning about a closed system. Installed a thermal expansion tank, set the pressure in the tank to match my PRV setting, and that ended the problem. I did have an interesting experience with this. When I went shopping for a expansion tank, I first went to L***s. They sell PRVs, but not only did they not have expansion tanks, they had never heard of them. The salesman tried to sell me a pressure tank for a well! Last time I checked, they still don't have expansion tanks. I then went to HD, and they had 2 sizes in stock.

It looks like there may be a PRV before the meter, and maybe a check valve after. If so, the house should have an expansion tank, and if the leak from the relief valve (which could easily be set below the T&P valve) is new, it's either because the PRV has failed (it it is one), or the expansion tank has failed.

A PRV with a bypass only opens when the house water pressure exceeds the supply pressure, so it depends on what that pressure is whether it would cause big problems, but the whole idea of a PRV is to keep the pressure steady, and an internal bypass won't do that - thus, the need for the expansion tank.

In rereading the original post I noticed something that I think should answer his question, but you guys tell me...

The original poster says, "When I turn off the main off to the house, the water stops leaking."

The only handle in this arrangement by which he can turn the water off to the house is beyond the line to the Pressure Relief Valve.

That is, the line to the pressure relief valve sits between the red handle and what we think is a backflow preventer. If the pressure coming from the city main side was causing the relief valve to open a little (i.e. defective pressure relief valve or defective pressure reduction valve), then turning off the house line wouldn't make any difference, because the valve to do so is beyond the branch to the pressure relief valve. Accordingly, if closing the main valve to the house reduces the pressure on the relief valve, then doesn't it stand to reason that the pressure is coming from the "house" side of the main valve?

Wouldn't that necessarily implicate water heating and a failed or failing expansion tank, assuming that what looks like a check valve (backflow preventer) after the water meter is indeed closing the system?