If you are using an asynchronous connection method, you can monitor the intermediate state of the connection to the database with PQstatus(). If you are using the Connection Manager, the enum value returned by PQstatus() is appended with the following:
CONNECTION_AWAITING_CMRESPONSE / * Waiting for a response from the conmgr process * /