What type of guitar are you using? David Gilmour is obviously using a Strat for this solo. He's also using a Big Muff (triangle or ram's head version) for his distortion. Which has a sustain knob. It's a "fuzz" distortion pedal, but the sustain knob tightens up the fuzz and turns it into a more smooth tone that gets the long smooth effect that Gilmour is using throughout the solos of Comfortably Numb. You can get the re-issue pedals for $99 and maybe cheaper used on Reverb. I actually just replaced my 90's black Russian Muff with a re-issue of the Triangle Muff.
Sustain is a tricky thing, though... It can come from your fingers, the guitar, and the pedals you're pluggin into. So, theres a lot of variables there. I'd strip the pedal chain down to the distortion, delay and reverb and see where that gets you. If you're not getting the sustain, maybe replace your DS-1 with a Muff triangle.