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
The troubleshooting guides for Azure Database for PostgreSQL flexible server are designed to help you quickly identify and resolve common challenges you may encounter while using Azure Database for PostgreSQL flexible server. Integrated directly into the Azure portal, the troubleshooting guides provide actionable insights, recommendations, and data visualizations to assist you in diagnosing and addressing issues related to common performance problems. With these guides at your disposal, you'll be better equipped to optimize your Azure Database for PostgreSQL flexible server experience and ensure a smoother, more efficient database operation.
17
+
The troubleshooting guides for Azure Database for PostgreSQL flexible server are designed to help you quickly identify and resolve common challenges you may encounter while using Azure Database for PostgreSQL flexible server. Integrated directly into the Azure portal, the troubleshooting guides provide actionable insights, recommendations, and data visualizations to assist you in diagnosing and addressing issues related to common performance problems. With these guides at your disposal, you are better equipped to optimize your Azure Database for PostgreSQL flexible server experience and ensure a smoother, more efficient database operation.
18
18
19
19
## Overview
20
20
21
21
The troubleshooting guides available in Azure Database for PostgreSQL flexible server provide you with the necessary tools to analyze and troubleshoot prevalent performance issues,
22
22
including:
23
-
*High CPU Usage,
24
-
*High Memory Usage,
25
-
*High IOPS Usage,
26
-
*High Temporary Files,
27
-
* Autovacuum Monitoring,
28
-
* Autovacuum Blockers.
23
+
* CPU
24
+
* Memory
25
+
* IOPS
26
+
* Temporary files
27
+
* Autovacuum monitoring
28
+
* Autovacuum blockers
29
29
30
30
:::image type="content" source="./media/concepts-troubleshooting-guides/overview-troubleshooting-guides.jpg" alt-text="Screenshot of multiple Troubleshooting Guides combined." lightbox="./media/concepts-troubleshooting-guides/overview-troubleshooting-guides.jpg":::
31
31
@@ -34,65 +34,68 @@ The troubleshooting guides are directly integrated into the Azure portal and you
34
34
35
35
The troubleshooting guides consist of the following components:
36
36
37
-
-**High CPU Usage**
37
+
-**CPU**
38
38
39
-
* CPU Utilization
40
-
* Workload Details
41
-
* Transaction Trends and Counts
42
-
* Long Running Transactions
43
-
* Top CPU Consuming queries
44
-
* Total User Only Connections
39
+
* CPU
40
+
* Workload
41
+
* Transactions
42
+
* Long running transactions
43
+
* Queries
44
+
* User connections
45
+
* Locking and blocking
45
46
46
-
-**High Memory Usage**
47
+
-**Memory**
47
48
48
-
* Memory Utilization
49
-
* Workload Details
50
-
*Long Running Sessions
51
-
*Top Queries by Data Usage
52
-
*Total User only Connections
53
-
*Guidelines for configuring parameters
49
+
* Memory
50
+
* Workload
51
+
* Sessions
52
+
* Queries
53
+
* User connections
54
+
*Memory parameters
54
55
55
-
-**High IOPS Usage**
56
+
-**IOPS**
56
57
57
-
* IOPS Usage
58
-
* Workload Details
59
-
*Session Details
60
-
*Top Queries by IOPS
61
-
*IO Wait Events
62
-
*Checkpoint Details
63
-
* Storage Usage
58
+
* IOPS
59
+
* Workload
60
+
*Sessions
61
+
* Queries
62
+
*Waits
63
+
*Checkpoints
64
+
* Storage
64
65
65
-
-**High Temporary Files**
66
+
-**Temporary files**
66
67
67
-
* Storage Utilization
68
-
* Temporary Files Generated
69
-
* Workload Details
70
-
*Top Queries by Temporary Files
68
+
* Storage
69
+
* Temporary files
70
+
* Workload
71
+
* Queries
71
72
72
-
-**Autovacuum Monitoring**
73
+
-**Autovacuum monitoring**
73
74
74
-
* Bloat Ratio
75
-
* Tuple Counts
76
-
* Tables Vacuumed & Analyzed Execution Counts
77
-
* Autovacuum Workers Execution Counts
75
+
* Bloat
76
+
* Tuples
77
+
* Vacuum and analyze
78
+
* Autovacuum workers
79
+
* Autovacuum per table
80
+
* Enhanced metrics
78
81
79
-
-**Autovacuum Blockers**
82
+
-**Autovacuum blockers**
80
83
81
-
* Emergency AV and Wraparound
82
-
* Autovacuum Blockers
84
+
* Emergency autovacuum and wraparound
85
+
* Autovacuum blockers
83
86
84
87
85
-
Before using any troubleshooting guide, it is essential to ensure that all prerequisites are in place. For a detailed list of prerequisites, please refer to the [Use Troubleshooting Guides](how-to-troubleshooting-guides.md) article.
88
+
Before using any troubleshooting guide, it's essential to ensure that all prerequisites are in place. For a detailed list of prerequisitesrefer to the article [Use troubleshooting guides](how-to-troubleshooting-guides.md).
86
89
87
90
### Limitations
88
91
89
-
* Troubleshooting Guides are not available for [read replicas](concepts-read-replicas.md).
90
-
*Please be aware that enabling Query Store on the Burstable pricing tier can lead to a negative impact on performance. As a result, it is generally not recommended to use Query Store with this particular pricing tier.
92
+
* Troubleshooting guides aren't available for [read replicas](concepts-read-replicas.md).
93
+
*Be aware that enabling Query Store on the Burstable pricing tier can lead to a negative impact on performance. As a result, it's not recommended to use Query Store with this particular pricing tier.
91
94
92
95
93
96
## Next steps
94
97
95
-
* Learn more about [How to use Troubleshooting Guides](how-to-troubleshooting-guides.md).
98
+
* Learn more about [How to use troubleshooting guides](how-to-troubleshooting-guides.md).
96
99
* Learn more about [Troubleshoot high CPU utilization](how-to-high-cpu-utilization.md).
97
100
* Learn more about [High memory utilization](how-to-high-memory-utilization.md).
98
101
* Learn more about [Troubleshoot high IOPS utilization](how-to-high-io-utilization.md).
Copy file name to clipboardExpand all lines: articles/postgresql/flexible-server/how-to-troubleshooting-guides.md
+30-25Lines changed: 30 additions & 25 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,57 @@ 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<br/>PostgreSQL Server Sessions data<br/>PostgreSQL Server Query Store Runtime<br/>AllMetrics | pg_qs.query_capture_mode to TOP or ALL | metrics.collector_database_activity | N/A |
34
+
| Memory | PostgreSQL Server Logs<br/>PostgreSQL Server Sessions data<br/>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<br/>PostgreSQL Server Logs<br/>PostgreSQL Server Sessions data<br/>PostgreSQL Server Query Store Wait Statistics | pg_qs.query_capture_mode to TOP or ALL<br/>pgms_wait_sampling.query_capture_mode to ALL | metrics.collector_database_activity | track_io_timing to ON |
36
+
| Temporary files | PostgreSQL Server Sessions data<br/>PostgreSQL Server Query Store Runtime<br/>PostgreSQL Server Query Store Wait Statistics | pg_qs.query_capture_mode to TOP or ALL<br/>pgms_wait_sampling.query_capture_mode to ALL | metrics.collector_database_activity | N/A |
37
+
| Autovacuum monitoring | PostgreSQL Server Logs<br/>PostgreSQL Autovacuum and schema statistics<br/>PostgreSQL remaining transactions | N/A | N/A | log_autovacuum_min_duration |
> 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
-
In the example shown below, we utilize Azure Cloud Shell and the `psql` tool to accomplish this task:
69
-
70
69
:::image type="content" source="./media/how-to-troubleshooting-guides/retrieve-query-text.png" alt-text="Screenshot of retrieving the Query Text.":::
71
70
72
-
### Retrieving the Username
71
+
### Retrieving the name of a user or role
73
72
74
73
For privacy reasons, the Azure portal displays the role ID from the PostgreSQL metadata (pg_catalog) rather than the actual username.
75
74
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:
@@ -78,6 +77,12 @@ To retrieve the username, you can query the `pg_roles` view or use the query sho
78
77
SELECT'UserID'::regrole;
79
78
```
80
79
80
+
In the following example you would be retrieving the name of the user or role whose identifier is 24776.
81
+
82
+
```sql
83
+
SELECT'24776'::regrole;
84
+
```
85
+
81
86
:::image type="content" source="./media/how-to-troubleshooting-guides/retrieve-username.png" alt-text="Screenshot of retrieving the Username.":::
0 commit comments