We present new equation-of-state (EoS) data acquired by shock loading to pressures up to 245 GPa on both low-density samples (MgSiO3 glass) and high-density, polycrystalline aggregates (MgSiO3 perovskite + majorite). The latter samples were synthesized using a large-volume press. Modeling indicates that these materials transform to perovskite, postperovskite, and/or melt with increasing pressure on their Hugoniots. We fit our results together with existing P-V-T data from dynamic and static compression experiments to constrain the thermal EoS for the three phases, all of which are of fundamental importance to the dynamics of the lower mantle. The EoS for perovskite and postperovskite are well described with third-order Birch-Murnaghan isentropes, offset with a Mie-Grüneisen-Debye formulation for thermal pressure. The addition of shock data helps to distinguish among discrepant static studies of perovskite, and for postperovskite, constrain a value of K' significantly larger than 4. For the melt, we define for the first time a single EoS that fits experimental data from ambient pressure to 230 GPa; the best fit requires a fourth-order isentrope. We also provide a new EoS for Mg2SiO4 liquid, calculated in a similar manner. The Grüneisen parameters of the solid phases decrease with pressure, whereas those of the melts increase, consistent with previous shock wave experiments as well as molecular dynamics simulations. We discuss implications of our modeling for thermal expansion in the lower mantle, stabilization of ultra-low-velocity zones associated with melting at the core-mantle boundary, and crystallization of a terrestrial magma ocean.