Skip to content

Commit 5e4acf8

Browse files
authored
Merge pull request #279143 from nachoalonsoportillo/patch-13
Troubleshooting guides Performance workbooks V2 update
2 parents d711bde + 7aa8a8e commit 5e4acf8

File tree

6 files changed

+79
-71
lines changed

6 files changed

+79
-71
lines changed

articles/postgresql/flexible-server/concepts-troubleshooting-guides.md

Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ ms.topic: how-to
1414

1515
[!INCLUDE [applies-to-postgresql-flexible-server](~/reusable-content/ce-skilling/azure/includes/postgresql/includes/applies-to-postgresql-flexible-server.md)]
1616

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'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.
1818

1919
## Overview
2020

2121
The troubleshooting guides available in Azure Database for PostgreSQL flexible server provide you with the necessary tools to analyze and troubleshoot prevalent performance issues,
2222
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
2929

3030
:::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":::
3131

@@ -34,65 +34,68 @@ The troubleshooting guides are directly integrated into the Azure portal and you
3434

3535
The troubleshooting guides consist of the following components:
3636

37-
- **High CPU Usage**
37+
- **CPU**
3838

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
4546

46-
- **High Memory Usage**
47+
- **Memory**
4748

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
5455

55-
- **High IOPS Usage**
56+
- **IOPS**
5657

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
6465

65-
- **High Temporary Files**
66+
- **Temporary files**
6667

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
7172

72-
- **Autovacuum Monitoring**
73+
- **Autovacuum monitoring**
7374

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
7881

79-
- **Autovacuum Blockers**
82+
- **Autovacuum blockers**
8083

81-
* Emergency AV and Wraparound
82-
* Autovacuum Blockers
84+
* Emergency autovacuum and wraparound
85+
* Autovacuum blockers
8386

8487

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 prerequisites refer to the article [Use troubleshooting guides](how-to-troubleshooting-guides.md).
8689

8790
### Limitations
8891

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.
9194

9295

9396
## Next steps
9497

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).
9699
* Learn more about [Troubleshoot high CPU utilization](how-to-high-cpu-utilization.md).
97100
* Learn more about [High memory utilization](how-to-high-memory-utilization.md).
98101
* Learn more about [Troubleshoot high IOPS utilization](how-to-high-io-utilization.md).

articles/postgresql/flexible-server/how-to-troubleshooting-guides.md

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to use troubleshooting guides for Azure Database for Post
44
author: AwdotiaRomanowna
55
ms.author: alkuchar
66
ms.reviewer: maghan
7-
ms.date: 04/27/2024
7+
ms.date: 06/25/2024
88
ms.service: postgresql
99
ms.subservice: flexible-server
1010
ms.topic: how-to
@@ -18,58 +18,57 @@ In this article, you learn how to use troubleshooting guides for Azure Database
1818

1919
## Prerequisites
2020

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.
2424

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.
2726

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).
2928

30-
| Troubleshooting guide | Diagnostic settings log categories | Query Store | Enhanced Metrics | Server Parameters |
31-
|:----------------------|:--------------------------------------------------------------------------------------------------------------------|----------------------------------------------|-------------------------------------|-------------------|
32-
| 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 |
32+
|:----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|-------------------------------------|-----------------------------|
33+
| 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 |
38+
| Autovacuum blockers | PostgreSQL Server Sessions data<br/>PostgreSQL remaining transactions | N/A | N/A | N/A |
3839

3940

4041
> [!NOTE]
4142
> 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.
4243
43-
## Using Troubleshooting guides
44+
## Using the troubleshooting guides
4445

45-
To use troubleshooting guides, follow these steps:
46+
To use the troubleshooting guides, follow these steps:
4647

4748
1. Open the Azure portal and find an Azure Database for PostgreSQL flexible server instance that you want to examine.
4849

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*.
5051

5152
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.
5253

5354
:::image type="content" source="./media/how-to-troubleshooting-guides/portal-blade-overview.png" alt-text="Screenshot of Troubleshooting guides - tabular view.":::
5455

55-
4. Select the time range during which the problem occurred.
56+
4. Select the period of time which you want to analyze.
5657

5758
:::image type="content" source="./media/how-to-troubleshooting-guides/time-range.png" alt-text="Screenshot of time range picker.":::
5859

5960
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.
6061

61-
### Retrieving the Query Text
62+
### Retrieving the text of queries collected by query store
6263

6364
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.
6667
Once connected, query the `query_store.query_texts_view view` to retrieve the desired query text.
6768

68-
In the example shown below, we utilize Azure Cloud Shell and the `psql` tool to accomplish this task:
69-
7069
:::image type="content" source="./media/how-to-troubleshooting-guides/retrieve-query-text.png" alt-text="Screenshot of retrieving the Query Text.":::
7170

72-
### Retrieving the Username
71+
### Retrieving the name of a user or role
7372

7473
For privacy reasons, the Azure portal displays the role ID from the PostgreSQL metadata (pg_catalog) rather than the actual username.
7574
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
7877
SELECT 'UserID'::regrole;
7978
```
8079

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+
8186
:::image type="content" source="./media/how-to-troubleshooting-guides/retrieve-username.png" alt-text="Screenshot of retrieving the Username.":::
8287

8388

-28.3 KB
Loading
-33.6 KB
Loading
-3.01 KB
Loading
-9.65 KB
Loading

0 commit comments

Comments
 (0)