I bought this photo on eBay, because it was railway related, from the Fredericton New Brunswick area. It turns out that it was from Fredericton Junction, and it was part of a new water tank for steam engines.
Two men standing in a steel pipe, with a Canadian Pacific boxcar in the background.
There’s writing on the back:

July 29
Taken in Fredericton Junction part of Water Tank CPR C Naison C Tracey taking E M???”
Thanks to Kris Seaboyer for helping decode this writing.
I posted this on the RailsNB group in Facebook and many people chimed in.
Steve Lucas identified this as a riser for a steel water tank. He suggested that it was probably made by Horton Steel Works of Fort Erie, Ontario, a subsidiary of Chicago Bridge & Iron. Steve said that hundreds of these tanks were built across Canada in the 1920s and 1930s to replace the original wooden water tanks built by the CNR, CPR, Ontario Northland, TH&B and many others.
Danny McCracken shared this newspaper article, which identified the water tank as a 10,000 gallon tank.
Here’s a view of Fredericton Junction from 1920, from Art Clowes‘ extensive New Brunswick railway station collection. It shows the station, a water stand in the foreground, and in the distance you can see the old water tank that this one would have replaced.

Fredericton Junction was the point where the Fredericton Branch Railway connected to the European & North America Railway tracks (now owned by the NB Southern Railway). The branch ran 22.5 miles to downtown Fredericton. Before the railway came through, the town was known as Hartt’s Mills.
Back on Facebook, Nevin Reid referred to a history piece written by a Fredericton Junction resident. The community purchased the water tank and pumphouse in 1960 from the railway for $2800, for town use. With the demise of steam engines, the railway had no more use for it.
The tank was torn down in the late 1980s, after being replaced by the current municipal water tank.

I was trying to figure out where the tank was in the town. I went to historian Art Clowes‘ photo collection and found some “aerial” photos of the station and other parts of the town, like the one above. I realized that the photographer was probably on the tank itself.
That puts the tank right at the base of the wye, just north of Sunbury Drive (highway 101 now).
It’s not trackside, but one of the photos above shows a water stand by the platform that would supply the water to steam engines.
Art took a couple of photos of the steel tank in June 1978.

I have to assume that was the CP sectionman’s house next to the tank, given the insulbrick on the outside.

The photo above shows a gondola beside the water tank, the “inside” track of the wye. That track was present through the 2000s and I remember seeing centerbeam flatcars there, loading poles from the nearby Marwood pressure treated lumber plant.

Battered SOU 115649 was ready to be loaded with new Marwood poles on a gloomy afternoon in October 2006. The water tank would have been just off the left edge of this photo.
Google Maps still shows both legs of the wye track along with this “inside” track, but the east leg and the inside track were removed years ago.
I love how one old photo leads to a lot of research!