make sure we don't lose debug symbols with the O2 postgres compile flag

also move includes to force compilation error on clashing symbols