Why does pharyngitis cause dry heaving?

Patients with pharyngitis often have sticky secretions attached to the back wall of the pharynx, which chronically irritate the mucosal tissue of the pharynx for a long time causing coughing and dry heaving when the irritation is stronger.