CIS Microsoft Azure Foundations Benchmark v1.4.0/Database Services/61 of 115
4.3.4Ensure server parameter 'log_disconnections' is set to 'ON' for PostgreSQL Database Server
Control family: Database Services
Control description
Enable 'log_disconnections' on 'PostgreSQL Servers'.
How to implement
ResponsibilityCustomerYou configure and operate this in your own cloud accounts.
Logging disconnections records the end of each session and how long it lasted, which completes the picture from log_connections when investigating activity. Azure Database for PostgreSQL Single Server was retired on 28 March 2025, so this applies to flexible servers.
Before you start
The same on every cloud, before the steps in the tabs.
- Record in the PostgreSQL flexible server configuration standard that log_disconnections is ON, so every new server starts with it.
- Use it together with log_connections (4.3.3) when reviewing sessions.
Evidence
- The PostgreSQL flexible server configuration standard
On Azure the tasks set the server parameter on each Azure Database for PostgreSQL flexible server, then keep it checked across servers with Azure Policy or a configuration review.
Task 1Set log_disconnections on each flexible server
- Sign in to the Azure portal at portal.azure.com and open Azure Database for PostgreSQL flexible servers.
- Select the server, then Settings > Server parameters.
- Search for log_disconnections and set its value to ON.
- Select Save; if the parameter is static, restart the server in a quiet period when asked.
- Check it: searching Server parameters for log_disconnections shows ON.
Task 2Keep it checked across servers
- Open Policy > Definitions and search for PostgreSQL flexible servers.
- If a built-in definition audits log_disconnections, select it, select Assign, set Scope to the subscription and select Review + create > Create.
- Otherwise, add the parameter to the checklist used when a new server is created and to the quarterly configuration review.
- Check it: Policy > Compliance shows every flexible server compliant, or the review record lists each server's value.
Evidence
- Server parameters of each flexible server, showing log_disconnections set to ON
- The Azure Policy compliance results, or the configuration review record
Not applicable. This benchmark covers Azure only.
Not applicable. This benchmark covers Azure only.
Console steps as of 5 November 2026. Not every step has been confirmed in a live console yet, and menus and labels can move between releases, so look for the nearest match if one has changed.