libpg.so has loader side effects
It would appear that loading libpg has side effects on the loader, I
think this is called an rpath (readelf -d snippet):
Library runpath: [/usr/lib]
I believe it needs stripping before distribution (new to all this, happy
to stand corrected).
Found this by discovering that in python3 importing psycopg2 before libldap broke things, but not the other way around.
(from redmine: issue id 5704, created on 2016-06-10)