You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/postgresql/flexible-server/how-to-troubleshooting-guides.md
+24-23Lines changed: 24 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to use troubleshooting guides for Azure Database for Post
4
4
author: AwdotiaRomanowna
5
5
ms.author: alkuchar
6
6
ms.reviewer: maghan
7
-
ms.date: 04/27/2024
7
+
ms.date: 06/25/2024
8
8
ms.service: postgresql
9
9
ms.subservice: flexible-server
10
10
ms.topic: how-to
@@ -18,58 +18,59 @@ In this article, you learn how to use troubleshooting guides for Azure Database
18
18
19
19
## Prerequisites
20
20
21
-
To effectively troubleshoot specific issue, you need to make sure you have all the necessary data in place.
22
-
Each troubleshooting guide requires a specific set of data, which is sourced from three separate features: [Diagnostic settings](how-to-configure-and-access-logs.md), [Query Store](concepts-query-store.md), and [Enhanced Metrics](concepts-monitoring.md#enabling-enhanced-metrics).
23
-
All troubleshooting guides require logs to be sent to the Log Analytics workspace, but the specific category of logs to be captured may vary depending on the particular guide.
21
+
To effectively troubleshoot a specific issue, you need to make sure that you have all the necessary data in place.
22
+
Each troubleshooting guide requires a specific set of data, which is sourced from three separate features: [Diagnostic settings](how-to-configure-and-access-logs.md), [Query Store](concepts-query-store.md), and [Enhanced metrics](concepts-monitoring.md#enabling-enhanced-metrics).
23
+
All troubleshooting guides require logs to be sent to a Log Analytics workspace, but the specific category of logs to be captured may vary depending on the particular guide.
24
24
25
-
Please follow the steps described in [Configure and Access Logs - Azure Database for PostgreSQL - Flexible Server](howto-configure-and-access-logs.md) to configure diagnostic settings and send the logs to the Log Analytics workspace.
26
-
Query Store, and Enhanced Metrics are configured via the Server Parameters. Please follow the steps described in the configure server parameters in Azure Database for PostgreSQL flexible server articles for [Azure portal](howto-configure-server-parameters-using-portal.md) or [Azure CLI](howto-configure-server-parameters-using-cli.md).
25
+
Please, follow the steps described in [Configure and Access Logs - Azure Database for PostgreSQL - Flexible Server](howto-configure-and-access-logs.md) to configure diagnostic settings and send the logs to a Log Analytics workspace.
27
26
28
-
The table below provides information on the required log categories for each troubleshooting guide, as well as the necessary Query Store, Enhanced Metrics and Server Parameters prerequisites.
27
+
Query Store, and Enhanced metrics are configured via Server parameters. Please follow the steps described in the configure server parameters in Azure Database for PostgreSQL flexible server articles for [Azure portal](howto-configure-server-parameters-using-portal.md) or [Azure CLI](howto-configure-server-parameters-using-cli.md).
29
28
30
-
| Troubleshooting guide | Diagnostic settings log categories | Query Store | Enhanced Metrics | Server Parameters |
| Autovacuum Blockers | Azure Database for PostgreSQL flexible server Sessions, Azure Database for PostgreSQL flexible server Database Remaining Transactions | N/A | N/A | N/A |
33
-
| Autovacuum Monitoring | Azure Database for PostgreSQL flexible server Logs, PostgreSQL Tables Statistics, Azure Database for PostgreSQL flexible server Database Remaining Transactions | N/A | N/A | log_autovacuum_min_duration |
34
-
| High CPU Usage | Azure Database for PostgreSQL flexible server Logs, Azure Database for PostgreSQL flexible server Sessions, AllMetrics | pg_qs.query_capture_mode to TOP or ALL | metrics.collector_database_activity | N/A |
35
-
| High IOPS Usage | Azure Database for PostgreSQL flexible server Query Store Runtime, Azure Database for PostgreSQL flexible server Logs, Azure Database for PostgreSQL flexible server Sessions, Azure Database for PostgreSQL flexible server Query Store Wait Statistics | pgms_wait_sampling.query_capture_mode to ALL | metrics.collector_database_activity | track_io_timing to ON |
36
-
| High Memory Usage | Azure Database for PostgreSQL flexible server Logs, Azure Database for PostgreSQL flexible server Sessions, Azure Database for PostgreSQL flexible server Query Store Runtime | pg_qs.query_capture_mode to TOP or ALL | metrics.collector_database_activity | N/A |
37
-
| High Temporary Files | Azure Database for PostgreSQL flexible server Sessions, Azure Database for PostgreSQL flexible server Query Store Runtime, Azure Database for PostgreSQL flexible server Query Store Wait Statistics | pg_qs.query_capture_mode to TOP or ALL | metrics.collector_database_activity | N/A |
29
+
The table below provides information on the required log categories for each troubleshooting guide, as well as the necessary Query Store, Enhanced metrics and Server parameters prerequisites.
30
+
31
+
| Troubleshooting guide | Diagnostic settings log categories and metrics | Query Store | Enhanced metrics | Server parameters |
| CPU | PostgreSQL Server Logs, PostgreSQL Server Sessions data, PostgreSQL Server Query Store Runtime, AllMetrics | pg_qs.query_capture_mode to TOP or ALL | metrics.collector_database_activity | N/A |
34
+
| Memory | PostgreSQL Server Logs, PostgreSQL Server Sessions data, PostgreSQL Server Query Store Runtime | pg_qs.query_capture_mode to TOP or ALL | metrics.collector_database_activity | N/A |
35
+
| IOPS | PostgreSQL Server Query Store Runtime, PostgreSQL Server Logs, PostgreSQL Server Sessions data, PostgreSQL Server Query Store Wait Statistics | pg_qs.query_capture_mode to TOP or ALL, pgms_wait_sampling.query_capture_mode to ALL | metrics.collector_database_activity | track_io_timing to ON |
36
+
| Temporary files | PostgreSQL Server Sessions data, PostgreSQL Server Query Store Runtime, PostgreSQL Server Query Store Wait Statistics | pg_qs.query_capture_mode to TOP or ALL, pgms_wait_sampling.query_capture_mode to ALL | metrics.collector_database_activity | N/A |
> Please note that if you have recently enabled diagnostic settings, query store, enhanced metrics or server parameters, it may take some time for the data to be populated. Additionally, if there has been no activity on the database within a certain time frame, the charts might appear empty. In such cases, try changing the time range to capture relevant data. Be patient and allow the system to collect and display the necessary data before proceeding with your troubleshooting efforts.
42
43
43
-
## Using Troubleshooting guides
44
+
## Using the troubleshooting guides
44
45
45
-
To use troubleshooting guides, follow these steps:
46
+
To use the troubleshooting guides, follow these steps:
46
47
47
48
1. Open the Azure portal and find an Azure Database for PostgreSQL flexible server instance that you want to examine.
48
49
49
-
2. From the left-side menu, open Help > Troubleshooting guides.
50
+
2. From the left-side menu, under the *Monitoring* section, select *Troubleshooting guides*.
50
51
51
52
3. Navigate to the top of the page where you will find a series of tabs, each representing one of the six problems you may wish to resolve. Click on the relevant tab.
52
53
53
54
:::image type="content" source="./media/how-to-troubleshooting-guides/portal-blade-overview.png" alt-text="Screenshot of Troubleshooting guides - tabular view.":::
54
55
55
-
4. Select the time range during which the problem occurred.
56
+
4. Select the period of time which you want to analyze.
56
57
57
58
:::image type="content" source="./media/how-to-troubleshooting-guides/time-range.png" alt-text="Screenshot of time range picker.":::
58
59
59
60
5. Follow the step-by-step instructions provided by the guide. Pay close attention to the charts and data visualizations plotted within the troubleshooting steps, as they can help you identify any inaccuracies or anomalies. Use this information to effectively diagnose and resolve the problem at hand.
60
61
61
-
### Retrieving the Query Text
62
+
### Retrieving the text of queries collected by query store
62
63
63
64
Due to privacy considerations, certain information such as query text and usernames may not be displayed within the Azure portal.
64
-
To retrieve the query text, you need to log in to your Azure Database for PostgreSQL flexible server instance.
65
-
Access the `azure_sys` database using the PostgreSQL client of your choice, where query store data is stored.
65
+
To retrieve the text of those queries collected by query store, you need to log in to your Azure Database for PostgreSQL flexible server instance.
66
+
Using the PostgreSQL client of your choice, access the `azure_sys` database where query store data is stored.
66
67
Once connected, query the `query_store.query_texts_view view` to retrieve the desired query text.
67
68
68
69
In the example shown below, we utilize Azure Cloud Shell and the `psql` tool to accomplish this task:
69
70
70
71
:::image type="content" source="./media/how-to-troubleshooting-guides/retrieve-query-text.png" alt-text="Screenshot of retrieving the Query Text.":::
71
72
72
-
### Retrieving the Username
73
+
### Retrieving the name of a user or role
73
74
74
75
For privacy reasons, the Azure portal displays the role ID from the PostgreSQL metadata (pg_catalog) rather than the actual username.
75
76
To retrieve the username, you can query the `pg_roles` view or use the query shown below in your PostgreSQL client of choice, such as Azure Cloud Shell and the `psql` tool:
0 commit comments