Skip to content

Commit 1f9b84c

Browse files
add lightbox and other suggestions fixes
1 parent 7013f29 commit 1f9b84c

File tree

6 files changed

+10
-4
lines changed

6 files changed

+10
-4
lines changed

articles/postgresql/TOC.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,11 @@
413413
- name: Optimize performance when using pgvector
414414
href: flexible-server/how-to-optimize-performance-pgvector.md
415415
displayName: vector databases
416+
- name: Partitioning
417+
items:
418+
- name: Partitioning using pg_partman
419+
href: flexible-server/how-to-use-pg-partman.md
420+
displayName: pg_partman
416421
- name: Migration
417422
items:
418423
- name: Migrate Single Server to Flexible Server

articles/postgresql/flexible-server/how-to-use-pg-partman.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ PG_partman uses a template to control whether the table is UNLOGGED or not. This
3636

3737
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`
3838

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.":::
4040

4141
You can use server parameters in the Azure portal to change the following configuration options that affect the BGW process: 
4242

@@ -139,19 +139,20 @@ Run the command below to see the partitions created. 
139139
Postgres=> \d+ partman.partition_test;
140140
```
141141

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":::
143143

144144
Here's the output of the select statement executed.
145145

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":::
147147

148148
## How to manually run the run_maintenance procedure
149149

150150
```sql
151151
select partman.run_maintenance(p_parent_table:='partman.partition_test');
152152
```
153153

154-
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.
155156
156157
## How to schedule maintenance procedure using pg_cron
157158

18.8 KB
Loading
-6.59 KB
Loading
75.2 KB
Loading

0 commit comments

Comments
 (0)