  We present medium resolution (R~20,000) HST/COS ultraviolet spectra covering
1155-1760 A of the Seyfert 1 Mrk 509 obtained simultaneously with a
Chandra/LETGS spectrum as part of a multiwavelength campaign in 2009 that
included observations with XMM-Newton, SWIFT, and Integral. Our high S/N
spectrum detects additional complexity in the absorption troughs from a variety
of sources in Mrk 509, including the outflow from the active nucleus, the ISM
and halo of the host galaxy, and infalling clouds or stripped gas from a merger
that are illuminated by the AGN. Variability between the STIS and COS
observation of the -400 km/s component allows us to set an upper limit on its
distance of < 250 pc. Similarly, variability of a component at +150 km/s
between two prior FUSE observations limits its distance to < 1.5 kpc. The UV
absorption only partially covers the emission from the AGN nucleus. Covering
fractions are lower than those previously seen with STIS, and are comparable to
those seen with FUSE. Given the larger apertures of COS and FUSE compared to
STIS, we favor scattered light from an extended region near the AGN as the
explanation for the partial covering. As observed in prior X-ray and UV
spectra, the UV absorption has velocities comparable to the X-ray absorption,
but the bulk of the ultraviolet absorption is in a lower ionization state with
lower total column density than the gas responsible for the X-ray absorption.
We conclude that the outflow from the active nucleus is a multiphase wind.
