Hi @ab-oe ,
Welcome to Microsoft Q&A forum and thanks for using Azure services.
As I understand from the question, you want to log all slow queries on Azure PostgreSQL Flexible Server.
You have got the correct link where it is mentioned log_connections
cannot be disabled due to security reasons.
However, since Azure PostgreSQL Flexible Server is still evolving, an extra filter might be added in future in the Diagnostic Settings like we have in Azure MySQL:
You may post feedback for our team to add this feature in future here: Feedback Channel Azure PostgreSQL Flexible Server.
Other useful links for Configuration of Logs : https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/howto-configure-and-access-logs
Enable query logging in Azure database for PostgreSQL
Hope this helps. Please let us know your inputs in case of further queries. Thanks