If rack prices are not identical from one city to the next in Canada, the reason for that is simply that they are not in any way connected to a refinery's production costs. They are simply based on replacement cost—in other words, the highest price a refiner in a given region can fetch for the product being sold to the independents.
In Montreal, the price is lower than in Toronto, because the product comes into Montreal by boat. In Toronto, the product has to be imported by truck from the United States or from Montreal. Rack prices in Western Canada are probably even higher than in Toronto, because it costs the independents more to ship the product there. So, it has absolutely nothing to do with production costs which, as you say, should be equivalent across the country.