Skip to content

Commit d1160b9

Browse files
Update how-to-troubleshooting-guides.md
1 parent d197e1d commit d1160b9

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

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

Lines changed: 24 additions & 23 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,59 @@ 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, 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 |
37+
| Autovacuum monitoring | PostgreSQL Server Logs, PostgreSQL Autovacuum and schema statistics, PostgreSQL remaining transactions | N/A | N/A | log_autovacuum_min_duration |
38+
| Autovacuum blockers | PostgreSQL Server Sessions data, 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

6869
In the example shown below, we utilize Azure Cloud Shell and the `psql` tool to accomplish this task:
6970

7071
:::image type="content" source="./media/how-to-troubleshooting-guides/retrieve-query-text.png" alt-text="Screenshot of retrieving the Query Text.":::
7172

72-
### Retrieving the Username
73+
### Retrieving the name of a user or role
7374

7475
For privacy reasons, the Azure portal displays the role ID from the PostgreSQL metadata (pg_catalog) rather than the actual username.
7576
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

Comments
 (0)