What do you mean staring at the railing?

By means to rely on.

The pillar is the railing of a tall building.

People leaning against railings are usually worried.

Some people meditate,

Some are looking forward to the return of people from afar.

Therefore, in poetry, it is often used to express sadness, missing, meditating alone and so on.

When the ancients had something on their minds, they often leaned against the railing of the attic and overlooked it. In fact, they are worried about their thoughts.

So staring at the railing literally means leaning against the railing and looking at the distance, but actually staring at the distance with a lot of worries.

What's on your mind depends on the specific situation.