libpq.soファイルが存在するのに以下のようなエラーがでてDBD::Pgがうまく動かない場合、/etc/ld.so.confを正しく設定しましょう。
[/etc/ld.so.conf] /usr/local/pgsql/lib