Skip to content

Commit 67950e1

Browse files
new guides
1 parent 736fbf0 commit 67950e1

File tree

4 files changed

+14
-115
lines changed

4 files changed

+14
-115
lines changed

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

Lines changed: 14 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -39,134 +39,33 @@ The table below provides information on the required log categories for each tro
3939
| High temporary file usage | "PostgreSQL Query Store Runtime", "PostgreSQL Query Store Wait Statistics" | pg_qs.query_capture_mode to TOP or ALL | metrics.collector_database_activity |
4040

4141

42-
4342
> [!NOTE]
44-
> When deploying read replicas for persistent heavy write-intensive primary workloads, the replication lag could continue to grow and may never be able to catch-up with the primary. This may also increase storage usage at the primary as the WAL files are not deleted until they are received at the replica.
45-
46-
## Create a read replica
47-
48-
To create a read replica, follow these steps:
49-
50-
1. Select an existing Azure Database for PostgreSQL server to use as the primary server.
51-
52-
2. On the server sidebar, under **Settings**, select **Replication**.
53-
54-
3. Select **Add Replica**.
55-
56-
:::image type="content" source="./media/how-to-read-replicas-portal/add-replica.png" alt-text="Add a replica":::
57-
58-
4. Enter the Basics form with the following information.
59-
60-
:::image type="content" source="./media/how-to-read-replicas-portal/basics.png" alt-text="Enter the Basics information":::
61-
62-
> [!NOTE]
63-
> To learn more about which regions you can create a replica in, visit the [read replica concepts article](concepts-read-replicas.md).
64-
65-
6. Select **Review + create** to confirm the creation of the replica or **Next: Networking** if you want to add, delete or modify any firewall rules.
66-
:::image type="content" source="./media/how-to-read-replicas-portal/networking.png" alt-text="Modify firewall rules":::
67-
7. Leave the remaining defaults and then select the **Review + create** button at the bottom of the page or proceed to the next forms to add tags or change data encryption method.
68-
8. Review the information in the final confirmation window. When you're ready, select **Create**.
69-
:::image type="content" source="./media/how-to-read-replicas-portal/review.png" alt-text="Review the information in the final confirmation window":::
70-
71-
After the read replica is created, it can be viewed from the **Replication** window.
72-
73-
:::image type="content" source="./media/how-to-read-replicas-portal/list-replica.png" alt-text="View the new replica in the Replication window":::
74-
75-
> [!IMPORTANT]
76-
> Review the [considerations section of the Read Replica overview](concepts-read-replicas.md#considerations).
77-
>
78-
> To avoid issues during promotion of replicas always change the following server parameters on the replicas first, before applying them on the primary: max_connections, max_prepared_transactions, max_locks_per_transaction, max_wal_senders, max_worker_processes.
79-
80-
## Promote replicas
81-
82-
You can promote replicas to become stand-alone servers serving read-write requests.
83-
84-
> [!IMPORTANT]
85-
> Promotion of replicas cannot be undone. The read replica becomes a standalone server that supports both reads and writes. The standalone server can't be made into a replica again.
86-
87-
To promote replica from the Azure portal, follow these steps:
88-
89-
1. In the Azure portal, select your primary Azure Database for PostgreSQL server.
90-
91-
2. On the server menu, under **Settings**, select **Replication**.
92-
93-
3. Select the replica server for which to stop replication and hit **Promote**.
94-
95-
:::image type="content" source="./media/how-to-read-replicas-portal/select-replica.png" alt-text="Select the replica":::
96-
97-
4. Confirm promote operation.
98-
99-
:::image type="content" source="./media/how-to-read-replicas-portal/confirm-promote.png" alt-text="Confirm to promote replica":::
100-
101-
## Delete a primary server
102-
You can only delete primary server once all read replicas have been deleted. Follow the instruction in [Delete a replica](#delete-a-replica) section to delete replicas and then proceed with steps below.
103-
104-
To delete a server from the Azure portal, follow these steps:
105-
106-
1. In the Azure portal, select your primary Azure Database for PostgreSQL server.
107-
108-
2. Open the **Overview** page for the server and select **Delete**.
109-
110-
:::image type="content" source="./media/how-to-read-replicas-portal/delete-server.png" alt-text="On the server Overview page, select to delete the primary server":::
111-
112-
3. Enter the name of the primary server to delete. Select **Delete** to confirm deletion of the primary server.
113-
114-
:::image type="content" source="./media/how-to-read-replicas-portal/confirm-delete.png" alt-text="Confirm to delete the primary server":::
115-
116-
## Delete a replica
117-
118-
You can delete a read replica similar to how you delete a standalone Azure Database for PostgreSQL server.
119-
120-
- In the Azure portal, open the **Overview** page for the read replica. Select **Delete**.
121-
122-
:::image type="content" source="./media/how-to-read-replicas-portal/delete-replica.png" alt-text="On the replica Overview page, select to delete the replica":::
123-
124-
You can also delete the read replica from the **Replication** window by following these steps:
125-
126-
1. In the Azure portal, select your primary Azure Database for PostgreSQL server.
127-
128-
2. On the server menu, under **Settings**, select **Replication**.
129-
130-
3. Select the read replica to delete and hit the **Delete** button.
131-
132-
:::image type="content" source="./media/how-to-read-replicas-portal/delete-replica02.png" alt-text="Select the replica to delete":::
133-
134-
4. Acknowledge **Delete** operation.
135-
136-
:::image type="content" source="./media/how-to-read-replicas-portal/delete-confirm.png" alt-text="Confirm to delete te replica":::
137-
138-
## Monitor a replica
139-
140-
Two metrics are available to monitor read replicas.
141-
142-
### Max Physical Replication Lag
143-
> Available only on the primary.
43+
> Please note that if you have recently enabled diagnostic settings, query store, or enhanced metrics, 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.
14444
145-
The **Max Physical Replication Lag** metric shows the lag in bytes between the primary server and the most-lagging replica.
45+
## Using Troubleshooting guides
14646

147-
1. In the Azure portal, select the primary server.
47+
To use troubleshooting guides, follow these steps:
14848

149-
2. Select **Metrics**. In the **Metrics** window, select **Max Physical Replication Lag**.
49+
1. Open the Azure portal and find a Postgres instance that you want to examine.
15050

151-
:::image type="content" source="./media/how-to-read-replicas-portal/metrics_max_physical_replication_lag.png" alt-text="Screenshot of the Metrics blade showing Max Physical Replication Lag metric.":::
51+
2. From the left-side menu, open Help > Troubleshooting guides.
15252

153-
3. For your **Aggregation**, select **Max**.
53+
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.
15454

155-
### Read Replica Lag metric
156-
> Available only on replicas.
55+
:::image type="content" source="./media/how-to-troubleshooting-guides/portal-blade-overview.png" alt-text="Troubleshooting guides - tabular view":::
15756

158-
The **Read Replica Lag** metric shows the time since the last replayed transaction on a replica. If there are no transactions occurring on your primary, the metric reflects this time lag. For instance if there are no transactions occurring on your primary server, and the last transaction was replayed 5 seconds ago, then the Read Replica Lag will show 5 second delay.
57+
4. Select the time range during which the problem occurred.
15958

160-
1. In the Azure portal, select read replica.
59+
:::image type="content" source="./media/how-to-troubleshooting-guides/time-range.png" alt-text="Choose the time range of interest":::
16160

162-
2. Select **Metrics**. In the **Metrics** window, select **Read Replica Lag**.
61+
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.
16362

164-
:::image type="content" source="./media/how-to-read-replicas-portal/metrics_read_replica_lag.png" alt-text=" screenshot of the Metrics blade showing Read Replica Lag metric.":::
165-
166-
3. For your **Aggregation**, select **Max**.
16763

16864
## Next steps
16965

170-
* Learn more about [read replicas in Azure Database for PostgreSQL](concepts-read-replicas.md).
66+
* Learn more about [Troubleshoot high CPU utilization](how-to-high-cpu-utilization.md).
67+
* Learn more about [High memory utilization](how-to-high-memory-utilization.md).
68+
* Learn more about [Troubleshoot high IOPS utilization](how-to-high-io-utilization.md).
69+
* Learn more about [Autovacuum Tuning](how-to-autovacuum-tuning.md).
17170

17271
[//]: # (* Learn how to [create and manage read replicas in the Azure CLI and REST API](how-to-read-replicas-cli.md).)
154 KB
Loading
42.3 KB
Loading
34.8 KB
Loading

0 commit comments

Comments
 (0)