Add PQ calculation and primary key retrieval to req_pq method.