Put checks in to verify that rows from postgres are sorted by ID.