debug pg refs

hunting #7891