ObjectiveTo analyze the relationship between preoperative pulmonary function indexes and postoperative pneumonia (POP) in patients undergoing upper gastrointestinal surgery.MethodsThe clinical data of 303 patients who underwent lung function examination and upper gastrointestinal surgery in West China Hospital, Sichuan University from September 2020 to January 2021 were prospectively collected and analyzed. There were 217 males and 86 females, with an average age of 61.61±10.42 years. Pulmonary function was evaluated from four aspects including ventilatory function, pulmonary volume, diffusion function and airway resistance. Relevant pulmonary function indicators were displayed as the percentage of actual measured value to predicted value (%pred). The outcome index was pneumonia within 30 days after the surgery. Logistic regression was used to analyze the relationship between preoperative pulmonary function indicators and POP.ResultsA total of 196 patients with gastric cancer and 107 patients with esophageal cancer were included, and the incidence of POP in patients undergoing upper gastrointestinal surgery was 26.7% (81/303). Patients with preoperative low peak expiratory flow (PEF%pred) had a 3.094 times higher risk of developing POP than those with normal PEF%pred [OR=3.094, 95%CI (1.362, 7.032), P=0.007]. The incidence of POP had no correlation with the other preoperative indicators.ConclusionPreoperative PEF%pred may be an important indicator for predicting the occurrence of POP in patients undergoing upper gastrointestinal surgery.