/usr/lib/pyshared/python2.7/_pg.so is in python-pygresql 1:4.0-3.1.
This file is owned by root:root, with mode 0o777.
It is a symlink to /usr/lib/pyshared/python2.7/../../python2.7/dist-packages/_pg.so
/usr/lib/pyshared/python2.7/../../python2.7/dist-packages/_pg.so