pg_close(...) will not technically close a persistent connection but instead returns it back to the connection pool thus giving you the desired effect of having the connection closed within your script.
http://www.sitepoint.com/article/accessing-postgresql-php/3
best wishes to all.