-
Notifications
You must be signed in to change notification settings - Fork 36
Doc: Add pg-controldata documentation #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jennifer88huang
wants to merge
5
commits into
apache:main
Choose a base branch
from
jennifer88huang:pg-controldata
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0f21568
add pg-controldata docs and sidebar
6e8815f
Merge branch 'apache:main' into pg-controldata
jennifer88huang 83fa11d
Update pg-controldata.md
jennifer88huang d1d179a
Update pg-controldata.md
jennifer88huang 611091c
Update pg-controldata.md
jennifer88huang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| --- | ||
| title: pg_controldata | ||
| --- | ||
|
|
||
| # pg_controldata | ||
|
|
||
| The system utility `pg_controldata` displays the control information of an Apache Cloudberry cluster. | ||
|
|
||
| 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 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` | 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` | 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. | | ||
35 changes: 35 additions & 0 deletions
35
i18n/zh/docusaurus-plugin-content-docs/current/sys-utilities/pg-controldata.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| --- | ||
| title: pg_controldata | ||
| --- | ||
|
|
||
| # pg_controldata | ||
|
|
||
| `pg_controldata`工具显示 Apache Cloudberry 数据库集群的控制信息。 | ||
|
|
||
| 要运行此实用程序,你需要先初始化该集群,并且有权限读取数据目录。这种访问限制确保敏感控制信息的完整性和安全性。 | ||
|
|
||
| ## 概要 | ||
|
|
||
| ``` | ||
| pg_controldata [option] [[ -D | --pgdata ]datadir] | ||
| ``` | ||
|
|
||
| ## 描述 | ||
|
|
||
| `pg_controldata` 实用工具在 Apache Cloudberry 数据库管理中发挥着关键作用,它展示了与 Apache Cloudberry 数据库集群相关的控制信息。这些信息包含 initdb 过程中初始化的详细内容(例如目录版本),预写式日志记录以及检查点处理等。这些信息是集群范围的,并非集群内的某个数据库的。 | ||
|
|
||
| ## 命令行选项说明 | ||
|
|
||
| `pg_controldata` 实用工具支持以下命令行选项。 | ||
| | 命令行选项 | 作用 | | ||
| | ------------ | ------------------- | | ||
| | `-V` 和 `--version` | 输出 `pg_controldata` 版本号并退出。 | | ||
| | `-?` 和 `--help` | 输出所有参数列表。这些参数帮助用户使用该实用工具。 | | ||
|
|
||
| ## 环境变量 | ||
|
|
||
| `pg_controldata` 实用工具支持以下环境变量。 | ||
| | 环境变量 | 作用 | | ||
| | ------------ | ------------------- | | ||
| | `-PGDATA` | 数据目录的默认位置。可以用命令行或环境变量 `PGDATA` 指定数据目录。 | | ||
| | `-PG_COLOR` | 该变量决定是否在诊断消息中使用颜色。可用值有 `always`(始终)、`auto`(自动)、 和 `never`(从不)。将值设置为 `always`(始终)可确保诊断消息始终以彩色显示,这样可以提高可读性并从视觉上识别重要信息。将值设置为 `auto`(自动) 可根据输出终端的功能进行颜色编码。将值设置为 `never`(从不)则完全禁用颜色。 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better markdown writing style, it is recommended to reserve a blank line between the paragraph and the preceding title, in case that consecutive lines are rendered as one line.