題名通り
普段はリモートの環境や他拠点サーバから接続しているので
RDS Redshiftにぶら下げたセキュリティグループにはその拠点のグローバルIPを登録していたが、
EC2で立ち上げたインスタンスからも登録するのはグローバルIPだろうと設定したがつながらず・・
PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection timed out
Is the server running on host "xxxxxxxxxx.xxxxxxxxxx.ap-northeast-1.redshift.amazonaws.com" (nnn.nn.nn.nnn) and accepting
TCP/IP connections on port 5439? in bbbbb.php on line 123
という感じでエラーになった場合、
EC2-->RDSの場合で同一VPCならば、セキュリティグループにはEC2のプライベートIPアドレスを登録しましょう。