Move pg gem generation into the convergence phase