I got a 72" 1-1/2" o/d galvanized pipe.
Don’t have much wall space, so I had to get creative.
I have attic steps nailed to studs on one wall, so I married up a couple of 1x4 and screwed them between steps. Then I bored a 1-1/2" hole through them. Bored same hole through the 4x4 and put diagonal bracing from it down to the floor from 3 sides.
Ran the pipe through the 4x4 and the married 1x4, put a cap on each end. End result, I can slide the 4x4 up close to the wall when I don’t need it.
It’s not 100% stable, but it’s close enough and it’s strong enough that I won’t worry about it falling over.