IUPAC Nomenclature for aldehyde
IUPAC (2013) rule


  P-44.1.1 The senior parent structure has the maximum number
  of substituents corresponding to the principal characteristic
  group (suffix) or senior parent hydride …


(more e.g. here) is applied in the phase of selecting "parent structure", before than the "longest chain rule" (P-44.3.2, e.g. here) in the phase of selecting the "principal chain".

Therfore the latter name, 3-propylpentanedial, is correct.