Skip to content

Commit 0848e91

Browse files
committed
docs: add pg_partman ecosystem component documentation
Add the pg_partman adapter doc (overview, installation, usage) to the Eco Component Adaption section, in both English and Chinese. Closes #236 Signed-off-by: jokerzsd <2701819133@qq.com>
1 parent 6068dc3 commit 0848e91

4 files changed

Lines changed: 98 additions & 0 deletions

File tree

CN/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
*** xref:5.10.adoc[system_stats]
5454
*** xref:5.11.adoc[pgtt]
5555
*** xref:5.14.adoc[pgnodemx]
56+
*** xref:5.15.adoc[pg_partman]
5657
* 监控运维
5758
** xref:3.2.adoc[日常监控]
5859
** xref:3.3.adoc[日常维护]

CN/modules/ROOT/pages/5.15.adoc

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
:sectnums:
3+
:sectnumlevels: 5
4+
5+
= pg_partman
6+
7+
== 概述
8+
pg_partman 是一个用于管理分区表和索引的 PostgreSQL 扩展。它自动化地创建和维护基于时间或基于序号的分区。它与 IvorySQL 完全兼容。
9+
10+
== 安装
11+
12+
=== 前置条件
13+
自动后台维护需要 `pg_partman_bgw` 后台工作进程。在 postgresql.conf 中添加:
14+
15+
[literal]
16+
----
17+
shared_preload_libraries = 'pg_partman_bgw'
18+
----
19+
20+
=== 源码安装
21+
22+
[NOTE]
23+
请确保环境中已安装 **IvorySQL {ivorysql-version} 或以上版本**,且 `pg_config` 在 PATH 中。
24+
25+
[literal]
26+
----
27+
$ git clone https://github.com/pgpartman/pg_partman.git
28+
$ cd pg_partman
29+
$ make
30+
$ sudo make install
31+
----
32+
33+
== 创建扩展并验证
34+
35+
使用 psql 连接数据库,执行以下命令:
36+
37+
[literal]
38+
----
39+
ivorysql=# CREATE EXTENSION pg_partman;
40+
CREATE EXTENSION
41+
42+
ivorysql=# SELECT * FROM pg_available_extensions WHERE name = 'pg_partman';
43+
name | default_version | installed_version | comment
44+
------------+-----------------+-------------------+-----------------------
45+
pg_partman | 5.2.4 | 5.2.4 | Extension to manage partitioned tables by time or ID
46+
----
47+
48+
使用与配置请参见 https://github.com/pgpartman/pg_partman/blob/master/doc/pg_partman.md[pg_partman 文档]。

EN/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
*** xref:5.10.adoc[system_stats]
5454
*** xref:5.11.adoc[pgtt]
5555
*** xref:5.14.adoc[pgnodemx]
56+
*** xref:5.15.adoc[pg_partman]
5657
* Monitor and O&M
5758
** xref:3.2.adoc[Monitoring]
5859
** xref:3.3.adoc[Maintenance]

EN/modules/ROOT/pages/5.15.adoc

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
:sectnums:
3+
:sectnumlevels: 5
4+
5+
= pg_partman
6+
7+
== Overview
8+
pg_partman is a PostgreSQL extension for managing partitioned tables and indexes. It automates the creation and maintenance of time-based and serial-based partitions. It is fully compatible with IvorySQL.
9+
10+
== Installation
11+
12+
=== Prerequisites
13+
Automatic background maintenance requires the `pg_partman_bgw` background worker. Add it to `shared_preload_libraries` in `postgresql.conf`:
14+
15+
[literal]
16+
----
17+
shared_preload_libraries = 'pg_partman_bgw'
18+
----
19+
20+
=== Source Code Installation
21+
22+
[NOTE]
23+
Please ensure that **IvorySQL {ivorysql-version} or above** is installed and `pg_config` is available in `PATH`.
24+
25+
[literal]
26+
----
27+
$ git clone https://github.com/pgpartman/pg_partman.git
28+
$ cd pg_partman
29+
$ make
30+
$ sudo make install
31+
----
32+
33+
== Create Extension and Verify
34+
35+
Connect to the database with psql and execute the following commands:
36+
37+
[literal]
38+
----
39+
ivorysql=# CREATE EXTENSION pg_partman;
40+
CREATE EXTENSION
41+
42+
ivorysql=# SELECT * FROM pg_available_extensions WHERE name = 'pg_partman';
43+
name | default_version | installed_version | comment
44+
------------+-----------------+-------------------+-----------------------
45+
pg_partman | 5.2.4 | 5.2.4 | Extension to manage partitioned tables by time or ID
46+
----
47+
48+
See the https://github.com/pgpartman/pg_partman/blob/master/doc/pg_partman.md[pg_partman documentation] for usage and configuration.

0 commit comments

Comments
 (0)