A theoretical investigation has been made of electrostatic solitary structures in an electron-positron-ion (e-p-i) plasma, taking nonextensive electrons and nonextensive positrons. By employing the reductive perturbation method, the basic characteristics of ion-acoustic (IA) solitary waves (SWs) in a three-component e-p-i plasma (consisting of negatively charged nonextensive electrons, positively charged nonextensive positrons, and ions) have been addressed. The Korteweg-de Vries (K-dV), modified K-dV (mK-dV), and Gardner equations are derived and their numerical solutions are obtained. It has been shown that the combined effects of electron nonextensivity, positron nonextensivity, and ions significantly modify the behavior of these electrostatic solitary structures that have been found to exist with positive and negative potential in this plasma model. The present analysis may be useful to understand and demonstrate the dynamical properties of IA SWs in different astrophysical and cosmological scenarios (viz. stellar polytropes, hadronic matter and quark-gluon plasma, protoneutron stars, dark-matter halos, etc.).