Lots of good comments on the last post about straightening walls. There are several of the comments that are worth expanding on.
The best way is to get the wall right while shooting. Absolutely, do everything you can to get the walls straight while shooting like using a tripod and using the right and left frame edge as a reference. Many find a tripod limits the places in the room you can to shoot. That is, its hard to get in those tight corners with a tripod. Some have suggested in comments earlier this year that they like a mono pod with small legs on the bottom. Also, someone always brings up tilt and shift lenses when discussing this subject. Canon makes the TS-E 24mm and Nikon makes the wide angle shift 28mm. Yes, if you have an extra $1,000 in your equipment budget this is an alternative. The downside of this alternative is you are constrained to never shoot wider shots than 24 or 28mm. I find this too much of a limitation. For real estate work I'd rather spend my money on a ultra-wide zoom. Ultimately, whether you get the walls straight while shooting or in post processing is a workflow preference.
Are there exceptions to the straight wall rule? Yes, perhaps. The image above is an example of the kind of shot I always end up shooting at a home where there is an overlook or unique stairway view. With these kind of shot There is certainly no "right way" to get the walls on these kind of image. But at the same time I feel like this kind of image is never a very strong image compared to other images. I frequently shot them but almost never end up using them.
There is more than one way to adjust verticals. In Photoshop there are three commands under the Edit>Transform command. They are Distort, Skew and Perspective. Here is a nice description of the three methods. I'm in the habit of using Distort because if done it that way for so long. However, as you will see if you play with Skew a bit it works exactly like you want it to when you are straightening verticals. That is it straightens ONLY verticals. Perspective moves verticals symmetrically on both sides... this is usually not what I want to do. Distort has the advantage of being able to change verticals AND horizontals at the same time. I like Distort because I frequently find myself wanting to adjust both horizontals and verticals. There are a bunch of other ways to modify verticals. I summarized many of them in a previous post.
The thing I find amazing is how quickly the eye spots a vertical that is slightly off and the visual tension it creates. Some times you can feel the vertical is off but you have to get a reference guide next to it to tell for sure.