From 0f2156803390d86625687cc3bdb145ecd9a02057 Mon Sep 17 00:00:00 2001 From: huangjinfeng01 Date: Sun, 19 Jan 2025 22:53:40 +0800 Subject: [PATCH 1/4] add pg-controldata docs and sidebar --- docs/sys-utilities/pg-controldata.md | 31 +++++++++++++++++++ .../current/sys-utilities/pg-controldata.md | 30 ++++++++++++++++++ sidebars.ts | 1 + 3 files changed, 62 insertions(+) create mode 100644 docs/sys-utilities/pg-controldata.md create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md diff --git a/docs/sys-utilities/pg-controldata.md b/docs/sys-utilities/pg-controldata.md new file mode 100644 index 00000000000..d5aa35c7576 --- /dev/null +++ b/docs/sys-utilities/pg-controldata.md @@ -0,0 +1,31 @@ +--- +title: pg_controldata +--- + +# pg_controldata + +Displays control information of a PostgreSQL database cluster. + +Only the user who initialized the cluster and has read access to the data directory can run the utility. The access restriction ensures the integrity and security of the sensitive control information. + +## Synopsis +``` +pg_controldata [option] [[ -D | --pgdata ]datadir] +``` + +## Description +The `pg_controldata` utility serves a crucial role in PostgreSQL database administration by revealing control information related to a PostgreSQL database cluster. The information includes details initialized during the initdb process, such as the catalog version, write-ahead logging and checkpoint processing. It's important to note that the information is cluster-wide, and not specific to any individual database within the cluster. + +## Options +The `pg_controldata` utility supports the following options. +| Option | Description | +| ------------ | ------------------- | +| `-V` and `--version` | Print the `pg_controldata` version and exit. | +| `-?` and `--help` | Output a list of all supported arguments. It enables users to use the utility effectively. | + +## Environment variables +The `pg_controldata` utility supports the following environment variables. +| Variable | Description | +| ------------ | ------------------- | +| `-PGDATA` | The default location of data directory. You can specify the data directory on the command line, or use the environment variable `PGDATA`. | +| `-PG_COLOR` | Determine whether to use color in diagnostic messages. The available values are `always`, `auto` and `never`. Setting the value to `always` ensures that diagnostic messages are always presented in color, which enhances readability and visual identification of important information. Setting the value to `auto` enables color-coding based on the capabilities of the output terminal.Setting the value to `never` disables the usage of color entirely. | \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md new file mode 100644 index 00000000000..b523c1f6780 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md @@ -0,0 +1,30 @@ +--- +title: pg_controldata +--- + +# pg_controldata +显示PostgreSQL数据库集群的控制信息。 + +只有初始化集群且对数据目录有读取权限的用户才能运行此实用工具。这种访问限制确保了敏感控制信息的完整性和安全性。 + +## 概要 +``` +pg_controldata [option] [[ -D | --pgdata ]datadir] +``` + +## 描述 +`pg_controldata`实用工具在 PostgreSQL 数据库管理中发挥着关键作用,它展示了与 PostgreSQL 数据库集群相关的控制信息。这些信息包含 initdb 过程中初始化的详细内容(例如目录版本),预写式日志记录以及检查点处理等。这些信息是集群范围的,并非集群内的某个数据库的。 + +## 命令行选项说明 +`pg_controldata` 实用工具支持以下命令行选项。 +| 命令行选项 | 作用 | +| ------------ | ------------------- | +| `-V` 和 `--version` | 输出`pg_controldata`版本号并退出。 | +| `-?` 和 `--help` | 输出所有参数列表。这些参数帮助用户使用该实用工具。 | + +## 环境变量 +`pg_controldata` 实用工具支持以下环境变量。 +| 环境变量 | 作用 | +| ------------ | ------------------- | +| `-PGDATA` | 数据目录的默认位置。可以用命令行或环境变量`PGDATA` 指定数据目录。 | +| `-PG_COLOR` | 该变量决定是否在诊断消息中使用颜色。可用值有 `always(始终)`, `auto(自动)` 和 `never(从不)`。将值设置为 `always(始终)` 可确保诊断消息始终以彩色显示,这样可以提高可读性并从视觉上识别重要信息。将值设置为 `auto(自动)` 可根据输出终端的功能进行颜色编码。将值设置为 `never(从不)`则完全禁用颜色。 | \ No newline at end of file diff --git a/sidebars.ts b/sidebars.ts index 9f7f891f55b..cf8a115bc4e 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -370,6 +370,7 @@ const sidebars: SidebarsConfig = { 'sys-utilities/pg-dump', 'sys-utilities/pg-dumpall', 'sys-utilities/pg-filedump', + 'sys-utilities/pg-controldata', 'sys-utilities/psql', 'sys-utilities/reindexdb', 'sys-utilities/vacuumdb', From 83fa11d6f2e63a3f45b6eb63bcc40c2eae065b4f Mon Sep 17 00:00:00 2001 From: Nobody <95325635+jennifer88huang@users.noreply.github.com> Date: Wed, 22 Jan 2025 23:39:48 +0800 Subject: [PATCH 2/4] Update pg-controldata.md --- .../current/sys-utilities/pg-controldata.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md index b523c1f6780..8fb773455c8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md @@ -7,7 +7,7 @@ title: pg_controldata 只有初始化集群且对数据目录有读取权限的用户才能运行此实用工具。这种访问限制确保了敏感控制信息的完整性和安全性。 -## 概要 +## 命令概要 ``` pg_controldata [option] [[ -D | --pgdata ]datadir] ``` @@ -27,4 +27,4 @@ pg_controldata [option] [[ -D | --pgdata ]datadir] | 环境变量 | 作用 | | ------------ | ------------------- | | `-PGDATA` | 数据目录的默认位置。可以用命令行或环境变量`PGDATA` 指定数据目录。 | -| `-PG_COLOR` | 该变量决定是否在诊断消息中使用颜色。可用值有 `always(始终)`, `auto(自动)` 和 `never(从不)`。将值设置为 `always(始终)` 可确保诊断消息始终以彩色显示,这样可以提高可读性并从视觉上识别重要信息。将值设置为 `auto(自动)` 可根据输出终端的功能进行颜色编码。将值设置为 `never(从不)`则完全禁用颜色。 | \ No newline at end of file +| `-PG_COLOR` | 该变量决定是否在诊断消息中使用颜色。可用值有 `always(始终)`, `auto(自动)` 和 `never(从不)`。将值设置为 `always(始终)` 可确保诊断消息始终以彩色显示,这样可以提高可读性并从视觉上识别重要信息。将值设置为 `auto(自动)` 可根据输出终端的功能进行颜色编码。将值设置为 `never(从不)`则完全禁用颜色。 | From d1d179a5a7815c45f6069e7dc59e617cf7b9fab7 Mon Sep 17 00:00:00 2001 From: Nobody <95325635+jennifer88huang@users.noreply.github.com> Date: Fri, 7 Feb 2025 15:43:23 +0800 Subject: [PATCH 3/4] Update pg-controldata.md --- docs/sys-utilities/pg-controldata.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/sys-utilities/pg-controldata.md b/docs/sys-utilities/pg-controldata.md index d5aa35c7576..dc384c76bd4 100644 --- a/docs/sys-utilities/pg-controldata.md +++ b/docs/sys-utilities/pg-controldata.md @@ -4,28 +4,33 @@ title: pg_controldata # pg_controldata -Displays control information of a PostgreSQL database cluster. +The system utility `pg_controldata` displays the control information of an Apache Cloudberry cluster. -Only the user who initialized the cluster and has read access to the data directory can run the utility. The access restriction ensures the integrity and security of the sensitive control information. +To run this utility, you need to initialize the cluster and have read access to the data directory. This access restriction ensures the integrity and security of the sensitive control information. ## Synopsis + ``` pg_controldata [option] [[ -D | --pgdata ]datadir] ``` ## Description -The `pg_controldata` utility serves a crucial role in PostgreSQL database administration by revealing control information related to a PostgreSQL database cluster. The information includes details initialized during the initdb process, such as the catalog version, write-ahead logging and checkpoint processing. It's important to note that the information is cluster-wide, and not specific to any individual database within the cluster. + +The `pg_controldata` utility serves a crucial role in Apache Cloudberry administration by revealing control information related to an Apache Cloudberry cluster. The information includes details initialized during the initdb process, such as the catalog version, write-ahead logging and checkpoint processing. It's important to note that the information is cluster-wide, and not specific to any individual database within the cluster. ## Options + The `pg_controldata` utility supports the following options. | Option | Description | | ------------ | ------------------- | -| `-V` and `--version` | Print the `pg_controldata` version and exit. | -| `-?` and `--help` | Output a list of all supported arguments. It enables users to use the utility effectively. | +| `-V` and `--version` | Prints the `pg_controldata` version and exit. | +| `-?` and `--help` | Outputs a list of all supported arguments. It enables users to use the utility effectively. | ## Environment variables + The `pg_controldata` utility supports the following environment variables. + | Variable | Description | | ------------ | ------------------- | | `-PGDATA` | The default location of data directory. You can specify the data directory on the command line, or use the environment variable `PGDATA`. | -| `-PG_COLOR` | Determine whether to use color in diagnostic messages. The available values are `always`, `auto` and `never`. Setting the value to `always` ensures that diagnostic messages are always presented in color, which enhances readability and visual identification of important information. Setting the value to `auto` enables color-coding based on the capabilities of the output terminal.Setting the value to `never` disables the usage of color entirely. | \ No newline at end of file +| `-PG_COLOR` | Determines whether to use color in diagnostic messages. The available values are `always`, `auto`, and `never`. Setting the value to `always` ensures that diagnostic messages are always presented in color, which enhances readability and visual identification of important information. Setting the value to `auto` enables color-coding based on the capabilities of the output terminal. Setting the value to `never` disables the usage of color entirely. | From 611091c1797661e8ec16e0cb5c0d7aa16f3cfec7 Mon Sep 17 00:00:00 2001 From: Nobody <95325635+jennifer88huang@users.noreply.github.com> Date: Fri, 7 Feb 2025 15:47:34 +0800 Subject: [PATCH 4/4] Update pg-controldata.md --- .../current/sys-utilities/pg-controldata.md | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md b/i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md index 8fb773455c8..a8b2b33da98 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md @@ -3,28 +3,33 @@ title: pg_controldata --- # pg_controldata -显示PostgreSQL数据库集群的控制信息。 -只有初始化集群且对数据目录有读取权限的用户才能运行此实用工具。这种访问限制确保了敏感控制信息的完整性和安全性。 +`pg_controldata`工具显示 Apache Cloudberry 数据库集群的控制信息。 + +要运行此实用程序,你需要先初始化该集群,并且有权限读取数据目录。这种访问限制确保敏感控制信息的完整性和安全性。 + +## 概要 -## 命令概要 ``` pg_controldata [option] [[ -D | --pgdata ]datadir] ``` ## 描述 -`pg_controldata`实用工具在 PostgreSQL 数据库管理中发挥着关键作用,它展示了与 PostgreSQL 数据库集群相关的控制信息。这些信息包含 initdb 过程中初始化的详细内容(例如目录版本),预写式日志记录以及检查点处理等。这些信息是集群范围的,并非集群内的某个数据库的。 + +`pg_controldata` 实用工具在 Apache Cloudberry 数据库管理中发挥着关键作用,它展示了与 Apache Cloudberry 数据库集群相关的控制信息。这些信息包含 initdb 过程中初始化的详细内容(例如目录版本),预写式日志记录以及检查点处理等。这些信息是集群范围的,并非集群内的某个数据库的。 ## 命令行选项说明 + `pg_controldata` 实用工具支持以下命令行选项。 | 命令行选项 | 作用 | | ------------ | ------------------- | -| `-V` 和 `--version` | 输出`pg_controldata`版本号并退出。 | +| `-V` 和 `--version` | 输出 `pg_controldata` 版本号并退出。 | | `-?` 和 `--help` | 输出所有参数列表。这些参数帮助用户使用该实用工具。 | ## 环境变量 + `pg_controldata` 实用工具支持以下环境变量。 | 环境变量 | 作用 | | ------------ | ------------------- | -| `-PGDATA` | 数据目录的默认位置。可以用命令行或环境变量`PGDATA` 指定数据目录。 | -| `-PG_COLOR` | 该变量决定是否在诊断消息中使用颜色。可用值有 `always(始终)`, `auto(自动)` 和 `never(从不)`。将值设置为 `always(始终)` 可确保诊断消息始终以彩色显示,这样可以提高可读性并从视觉上识别重要信息。将值设置为 `auto(自动)` 可根据输出终端的功能进行颜色编码。将值设置为 `never(从不)`则完全禁用颜色。 | +| `-PGDATA` | 数据目录的默认位置。可以用命令行或环境变量 `PGDATA` 指定数据目录。 | +| `-PG_COLOR` | 该变量决定是否在诊断消息中使用颜色。可用值有 `always`(始终)、`auto`(自动)、 和 `never`(从不)。将值设置为 `always`(始终)可确保诊断消息始终以彩色显示,这样可以提高可读性并从视觉上识别重要信息。将值设置为 `auto`(自动) 可根据输出终端的功能进行颜色编码。将值设置为 `never`(从不)则完全禁用颜色。 |