Description
With the example’s on setting, log_connections records connection attempts that reach PostgreSQL and successful client authentication and authorization.
Potential impact
Without connection records, it is harder to establish which account connected, when it connected, or whether a pattern is unusual. Authentication failures may still appear in error logs.
Remediation
Choose a value your Flexible Server version supports for the connection events you need. Open a new authorized connection and find its account and time at the log destination. Correlate it with authentication and network records as needed. Set retention and reader access with collection costs in mind. Configure database access controls and query auditing separately.
Examples
The first task targets Single Server, which retired on March 28, 2025. The second updates an existing Flexible Server using azure.azcollection 3.18.0 or later.
Before
- name: PostgreSQL 설정 변경
azure.azcollection.azure_rm_postgresqlconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_connections
value: "off"
After
- name: PostgreSQL 설정 변경
azure.azcollection.azure_rm_postgresqlflexibleconfiguration:
resource_group: myResourceGroup
server_name: myServer
name: log_connections
value: "on"