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-use-pg-partman.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ PG_partman uses a template to control whether the table is UNLOGGED or not. This
36
36
37
37
There's another extension related to PG_partman called pg_partman_bgw, which must be included in Shared_Preload_Libraries. It offers a scheduled function run_maintenance(). It takes care of the partition sets that have automatic_maintenance turned ON in `part_config`.
38
38
39
-
:::image type="content" source="media/how-to-use-pg-partman/pg-partman-prerequisites-highlighted.png" alt-text="Screenshot of prerequisites highlighted.":::
39
+
:::image type="content" source="media/how-to-use-pg-partman/pg-partman-prerequisites-outlined.png" alt-text="Screenshot of prerequisites highlighted.":::
40
40
41
41
You can use server parameters in the Azure portal to change the following configuration options that affect the BGW process:
42
42
@@ -139,19 +139,20 @@ Run the command below to see the partitions created.
139
139
Postgres=> \d+partman.partition_test;
140
140
```
141
141
142
-
:::image type="content" source="media/how-to-use-pg-partman/pg-partman-table-output-partitions.png" alt-text="Screenshot of table out with partitions.":::
142
+
:::image type="content" source="media/how-to-use-pg-partman/pg-partman-table-output-partitions.png" alt-text="Screenshot of table out with partitions." lightbox="media/how-to-use-pg-partman/pg-partman-table-output-partitions.png":::
143
143
144
144
Here's the output of the select statement executed.
145
145
146
-
:::image type="content" source="media/how-to-use-pg-partman/pg-partman-explain-plan-output.png" alt-text="Screenshot of explain plan output.":::
146
+
:::image type="content" source="media/how-to-use-pg-partman/pg-partman-explain-plan-output.png" alt-text="Screenshot of explain plan output." lightbox="media/how-to-use-pg-partman/pg-partman-explain-plan-output.png":::
147
147
148
148
## How to manually run the run_maintenance procedure
Warning: If you insert data before creating partitions, the data goes to the default partition. If the default partition has data that belongs to a new partition that you want to be created later, then you get a default partition violation error and the procedure won't work. Therefore, change the premake value as recommended above and then run the procedure.
154
+
> [!WARNING]
155
+
> If you insert data before creating partitions, the data goes to the default partition. If the default partition has data that belongs to a new partition that you want to be created later, then you get a default partition violation error and the procedure won't work. Therefore, change the premake value as recommended above and then run the procedure.
155
156
156
157
## How to schedule maintenance procedure using pg_cron
0 commit comments