The technique of time-resolved pump-probe x-ray photoelectron spectroscopy using the free-electron laser in Hamburg (FLASH) is described in detail. Particular foci lie on the macrobunch resolving detection scheme, the role of vacuum space-charge effects and the synchronization of pump and probe lasers. In an exemplary case study, the complete Ta 4f core-level dynamics in the layered charge-density-wave (CDW) compound 1T-TaS2 in response to impulsive optical excitation is measured on the sub-picosecond to nanosecond timescale. The observed multi-component dynamics is related to the intrinsic melting and reformation of the CDW as well as to extrinsic pump-laser-induced vacuum space-charge effects.