I also believe that at least in the Trafalgar era, some of those pillars were removable.
Looking at McKays plans, as an architect, you see where the upper, main, lower and orlop deck beams all occur at the same spacing, one above the other and corresponding to the frames they attach to, which straddle the gunports, etc. But the quarterdeck has more closely spaced beams. The pillars are under four of the skid beams. Because they don't bear on an upper deck beam due to the different spacing, they are placed on the very large beams that run fore-aft and frame each side of the gratings on the upper deck.
That puts them considerably inboard of the inner edges of the gangways. And at least at that time, in his drawings, the gangways are a uniform width.
His drawings show very considerable horizontal lodging knees at those beams, as on all decks, but they don't show hanging knees.
I'm sure this is all pretty debatable, but it's fun to look at the structural framing plans and see how the whole thing ties together.
Bill