Fix primary key bug when using postprocessor