Aims. (1) To compare the efficacy of bupivacaine/fentanyl and ropivacaine/fentanyl for postoperative pain control (2). To identify the predictors of acute post-operative pain at rest, during deep breathing and coughing. Methods. The study was performed in patients aged 6-18 years after thoracic surgery. The subjects were randomized to the bupivacaine 0.125%/fentanyl 5.0 μg/mL (n=46) or ropivacaine 0.2%/fentanyl 5.0 μg/mL (n=48) group; analgesic mixtures were administered through epidural catheter. All the patients received paracetamol and non-steroidal antiinflammatory drugs. The observation period after surgery lasted 72 h. Pain intensity was assessed at rest, during deep breathing and coughing and was based on the Numerical Rating Scale and the FLACC scale (range 0-10). If the pain was above 2/10, the analgesia was modified. Results. Median pain scores at rest (0.4 vs. 0.5), during deep breathing (0.3 vs. 0.3) and coughing (0.6 vs. 0.6) were comparable in BF and RF group. The intensity of pain at rest was associated with the number of drains inserted into the thorax (β=0.39), the number of pain intensity measurements (β=0.36) and the number of nursing interventions undertaken to relieve pain (β=0.16). Pain intensity at rest determined the intensity of pain during deep breathing (β=0.60), which in turn decided on the severity of pain during coughing (β=0.80). The intensity of pain was increased by age. Conclusions. Thoracic epidural bupivacaine/fentanyl provided adequate pain relief and similar analgesia to ropivacaine/fentanyl. The effectiveness of analgesia depended on the number of pain measurements and interventions by nurses to relieve the pain. Trial Registration: ClinicalTrials.gov; Multimodal Analgesia in Children and Adolescents After the Ravitch Procedure and Thoracotomy; NCT03444636;