Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CN/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
*** xref:5.10.adoc[system_stats]
*** xref:5.11.adoc[pgtt]
*** xref:5.14.adoc[pgnodemx]
*** xref:5.15.adoc[pg_partman]
* 监控运维
** xref:3.2.adoc[日常监控]
** xref:3.3.adoc[日常维护]
Expand Down
48 changes: 48 additions & 0 deletions CN/modules/ROOT/pages/5.15.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

:sectnums:
:sectnumlevels: 5

= pg_partman

== 概述
pg_partman 是一个用于管理分区表和索引的 PostgreSQL 扩展。它自动化地创建和维护基于时间或基于序号的分区。它与 IvorySQL 完全兼容。

== 安装

=== 前置条件
自动后台维护需要 `pg_partman_bgw` 后台工作进程。在 postgresql.conf 中添加:

[literal]
----
shared_preload_libraries = 'pg_partman_bgw'
----

=== 源码安装

[NOTE]
请确保环境中已安装 **IvorySQL {ivorysql-version} 或以上版本**,且 `pg_config` 在 PATH 中。

[literal]
----
$ git clone https://github.com/pgpartman/pg_partman.git
$ cd pg_partman
$ make
$ sudo make install
----

== 创建扩展并验证

使用 psql 连接数据库,执行以下命令:

[literal]
----
ivorysql=# CREATE EXTENSION pg_partman;
CREATE EXTENSION

ivorysql=# SELECT * FROM pg_available_extensions WHERE name = 'pg_partman';
name | default_version | installed_version | comment
------------+-----------------+-------------------+-----------------------
pg_partman | 5.2.4 | 5.2.4 | Extension to manage partitioned tables by time or ID
----

使用与配置请参见 https://github.com/pgpartman/pg_partman/blob/master/doc/pg_partman.md[pg_partman 文档]。
1 change: 1 addition & 0 deletions EN/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
*** xref:5.10.adoc[system_stats]
*** xref:5.11.adoc[pgtt]
*** xref:5.14.adoc[pgnodemx]
*** xref:5.15.adoc[pg_partman]
* Monitor and O&M
** xref:3.2.adoc[Monitoring]
** xref:3.3.adoc[Maintenance]
Expand Down
48 changes: 48 additions & 0 deletions EN/modules/ROOT/pages/5.15.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

:sectnums:
:sectnumlevels: 5

= pg_partman

== Overview
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.

== Installation

=== Prerequisites
Automatic background maintenance requires the `pg_partman_bgw` background worker. Add it to `shared_preload_libraries` in `postgresql.conf`:

[literal]
----
shared_preload_libraries = 'pg_partman_bgw'
----

=== Source Code Installation

[NOTE]
Please ensure that **IvorySQL {ivorysql-version} or above** is installed and `pg_config` is available in `PATH`.

[literal]
----
$ git clone https://github.com/pgpartman/pg_partman.git
$ cd pg_partman
$ make
$ sudo make install
----

== Create Extension and Verify

Connect to the database with psql and execute the following commands:

[literal]
----
ivorysql=# CREATE EXTENSION pg_partman;
CREATE EXTENSION

ivorysql=# SELECT * FROM pg_available_extensions WHERE name = 'pg_partman';
name | default_version | installed_version | comment
------------+-----------------+-------------------+-----------------------
pg_partman | 5.2.4 | 5.2.4 | Extension to manage partitioned tables by time or ID
----

See the https://github.com/pgpartman/pg_partman/blob/master/doc/pg_partman.md[pg_partman documentation] for usage and configuration.
Loading