Hello,
I understand you are inquiring about how to debug the Google Cloud PostgreSQL, perhaps by Installing the PL/pgSQL Debugger Extension (pldbgapi).
As per this documentation[1], the PL/pgSQL Debugger Extension (pldbgapi) is not one of the supported PostgreSQL extensions supported by CloudSQL. To debug CloudSQL[PostgreSQL], you should probably consider using Cloud Logging[2] or you can enable Query logs by configuring Database flags[3], please keep in mind that this may incur some charges.
Please go through the details shared in the articles and if you have any further questions, you can post them on this thread.