pg_connection_busy()
basically calls libpq's PQconsumeInput()
followed by PQisBusy()
, both are documented in
Asynchronous Command Processing.
This has nothing to do with the server being busy overall with other connections. Also it doesn't send anything to it, query or otherwise, it's purely a local condition about the buffering of the incoming data when retrieving results asynchronously.
Unfortunately the example given by php's documentation is misleading. It calls pg_connection_busy()
on a new connection without any asynchronous query running, which doesn't make any sense.