Reference: Fataawa Islaamiyyah – Volume 1, Page 303
Question: Is it permissible to break the row in the congregational prayer with the masjid’s pillars, if it is full of worshipers?
Response: There is no doubt that it is preferable that the rows be tightly formed, [the worshipers] standing next to each other, not far apart; and this is from the Sunnah.
The Prophet (sal-Allaahu ‘alayhi wa sallam) ordered [the Companions] to form up tightly and to close up the gaps. And the Companions (radhi-yAllaahu ‘anhum) used to avoid the rows between the pillars, because doing so caused some of the ranks to be separated from others. But if there is a need for it, as in the question, due to the masjid being crowded with worshipers, then there is no objection in such a situation for them to form rows between the pillars, because exceptional circumstances are governed by special rulings, and necessity and need also have special rulings.