Use global `pg` (shared pool). Fix `mock.py` due to model changes.