ArcGIS for Desktop is a 32-bit application and therefore 32-bit client libraries are required for ArcGIS for Desktop to communicate with relational database management systems (RDBMS). This is true even if the RDBMS is 64-bit. However, if 64-bit background geoprocessing has been installed on top of ArcGIS for Desktop, the 64-bit background processing product requires the 64-bit client libraries in order to connect to the database; therefore, it is necessary to ensure that both 32-bit and 64-bit client libraries are installed.
When the 64-bit background geoprocessing product is installed, a new directory named bin64 is created which contains the necessary 64-bit PostgreSQL client libraries. The 64-bit background geoprocessing application is aware of the location of this directory, and is able to use these client libraries to run 64-bit Python.