Missing Query Duration Information in Azure PostgreSQL Logs

Anand Advani 5 Reputation points
2024-05-31T11:55:04.8166667+00:00

We are currently running PostgreSQL as a Flexible Server on Azure and have configured Azure Diagnostics to log queries. However, we are encountering an issue where the duration of the queries is not consistently logged in the Message column or the detail_s column.

We have already taken the following steps to address the issue:

  1. Verified and set the PostgreSQL logging parameters:
    • log_statement = 'all'
      • log_duration = 'on'
        • log_min_duration_statement = '0'
        1. Ensured that logs are being collected and monitored in Azure Monitor.
        2. Enabled detailed logging and performed various test queries.

Despite these efforts, the duration information is still not appearing for ALL queries in our logs. We would appreciate your assistance in diagnosing and resolving this issue.

Azure Database for PostgreSQL
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful