What are the attitudes of the schools to the experience of physical pain during sitting meditation? Both the Theravada and the Zen traditions appear to regard pain, even extreme physical pain, as a necessary part of sitting, whereas Ngakpa Chogyam in Journey into Vastness, speaking for the Dzogchen point of view, seems to imply that pain is an indication that one is not sitting properly and that there are ways of sitting that do not produce pain. 

The only references to pain in the context of meditation in the Pali Canon appear to refer to the Buddha's six-year period of self-mortification, which he repudiated (correct me with a specific reference if I am mistaken). Therefore, I am interested in the attitude of different Buddhist schools to pain in the context of sitting and meditation. Is it a sign of poor sitting practice or is it part of the experience, perhaps even something important that should be cultivated (e.g., ancient shamans used pain to induce altered states of consciousness, an example being the famous Sun Dance in which in which practitioners hung themselves by the pectoral muscles from a post for several days). 

What do the different Buddhist schools and traditions say about this?
Pain is obviously related to physical posture; obviously related to the mobility of an individual's body &amp; joints. Therefore, some individuals without any samadhi (meditative development) can sit for long periods while other individuals (who might have better samadhi) cannot sit as long without experiencing pain. 

For example, in the West, are often found slender naturally flexible women leading hatha yoga classes, who display no evidence of spiritual development (e.g., they are emotionally unbalanced, addicted to cigarettes, etc).

Imo, the above shows there is no relevance or correlation between physical posture/pain and meditative development. If it was otherwise, a naturally physically flexible person would either be advantaged or disadvantaged compared to another person. 

When samadhi (concentration) is genuinely developed (absorption into breathing, jhana, etc), awareness of pain disappears from consciousness, even though the legs themselves may become very stiff &amp; very painful. A samadhi practitioner may sit for a few hours without consciously experiencing pain then, after emerging from samadhi, will struggle to stand up &amp; walk. 

This is why I am not aware of any instructions in the Pali teachings about meditation &amp; physical pain. In fact, the very essence of the Middle-Way is the development of jhana (with rapture, happiness &amp; equanimity) which is contrary to those Theravada schools (Goenka; Mahasi, etc) that teach meditation on pain. 

Since the ultimate purpose of Buddhist meditation is to develop a bliss (samatha) that liberates an individual from reliance on sensuality &amp; then insight (vipassana) that liberates a individual from attachment, self-view &amp; suffering, it is obvious meditation on pain is not directly relevant to the Buddhist path.

When I was young, I practised meditation very intensively and developed some capacity to be non-attached. Then at a later time, my body suffered an injury &amp; a lengthy rehabilitation that was very painful at times. I required no additional training in non-attachment to deal with my injury &amp; rehabilitation. The non-attachment developed in my painless meditation, when I was younger, was more than sufficient. 

It may sound like a paradox but non-attachment &amp; dispassion towards rapture (piti) is said by some to be much more effective at dealing with pain that direct meditation on pain itself. This is probably why the Buddha encouraged the development of non-attachment &amp; egolessness (rather than meditation on pain itself).