You'll need to recompile PL/Python against Python 2.7.
Right now PL/Python will keep using Python 2.6. They aren't binary compatible and have separate sonames, libpython2.7.so
and libpython2.6.so
. So just changing the PATH
and LD_LIBRARY_PATH
will do nothing.
I would do this by downloading the PostgreSQL SRPM, modifying the spec file so it targets python 2.7, and rebuilding the RPMs.