Using Console
pgaudit.enabled
and set the value to on
.
Using CLI
Using Python
google-cloud-sql
library to connect to the PostgreSQL instance. You can install this library using pip:
patch
method of the DatabaseInstance
object to update the settings.settingsVersion
field with the latest version. This will ensure that you are making changes to the latest version of the settings.patch
method again to update the settings.databaseFlags
field with the pgaudit.log
flag set to on
. This will enable PGAudit database flag.settings
field of the DatabaseInstance
object: