Binding of the hydroxyl group to the aldehyde (by reversible formation of a hemiacetal) would bring the ester close to the pyridine nitrogen, and enable nucleophilic catalysis and hydrolysis at a ...