-
Notifications
You must be signed in to change notification settings - Fork 36
Add doc about pg_waldump #232
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,29 @@ | ||||||||||||
| # pg_waldump in Apache Cloudberry | ||||||||||||
|
|
||||||||||||
| Apache Cloudberry offers a robust mechanism for inspecting Write-Ahead Log (WAL) files, aiding users in analyzing database changes, tracking operations, and diagnosing issues. The `pg_waldump` functionality in Cloudberry emulates the `pg_waldump` utility found in PostgreSQL, with enhancements tailored for Cloudberry's distributed architecture. | ||||||||||||
|
|
||||||||||||
| ## Features | ||||||||||||
|
|
||||||||||||
| - **WAL Analysis**: The `pg_waldump` function in Cloudberry allows users to parse and decode WAL files, presenting a human-readable format of the log data. | ||||||||||||
| - **Multi-Node Support**: Unlike PostgreSQL's single-node setup, Cloudberry's `pg_waldump` supports analyzing WAL logs across distributed nodes, making it suitable for distributed databases. | ||||||||||||
| - **Customizable Output**: The output format can be adjusted based on user preferences, including the level of detail and specific data points to be logged. | ||||||||||||
| - **Real-Time Monitoring**: Cloudberry enhances `pg_waldump` with real-time monitoring capabilities, allowing users to track WAL activities as they occur. | ||||||||||||
| - **Error Diagnosis**: The tool assists in identifying errors or anomalies within the WAL entries, aiding in troubleshooting issues related to database integrity and replication. | ||||||||||||
|
|
||||||||||||
| ## Usage | ||||||||||||
|
|
||||||||||||
| 1. **Access pg_waldump**: Connect to the Cloudberry instance using the command-line interface (CLI). | ||||||||||||
| 2. **Run the Command**: Execute the `pg_waldump` command with the appropriate options to start analyzing the WAL logs. A basic example is: | ||||||||||||
| ```bash | ||||||||||||
| pg_waldump --nodes=node1,node2 --format=human --level=high | ||||||||||||
|
Comment on lines
+17
to
+18
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
|
||||||||||||
| ## Options | ||||||||||||
|
|
||||||||||||
| Here are some common options for `pg_waldump`: | ||||||||||||
|
|
||||||||||||
| - `-f, --format`: Output format (e.g., plain text, JSON). | ||||||||||||
| - `-p, --pagesize`: Set the WAL page size. | ||||||||||||
| - `-c, --cluster`: Analyze a specific PostgreSQL cluster. | ||||||||||||
| - `-l, --list`: List available WAL segments. | ||||||||||||
| - `-s, --start`: Start point of WAL decoding. | ||||||||||||
| - `-e, --end`: End point of WAL decoding. | ||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,33 @@ | ||||||||||||
|
|
||||||||||||
| ### 中文版本: Apache Cloudberry中的pg_waldump | ||||||||||||
|
|
||||||||||||
| ```markdown | ||||||||||||
|
Comment on lines
+2
to
+4
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
| # Apache Cloudberry中的pg_waldump | ||||||||||||
|
|
||||||||||||
| Apache Cloudberry提供了一种强大的机制,用于检查预写日志(WAL)文件,帮助用户分析数据库变化、跟踪操作以及诊断问题。Cloudberry中的`pg_waldump`功能模仿了PostgreSQL中的`pg_waldump`工具,但针对Cloudberry的分布式架构进行了增强。 | ||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please reserve a space between an English character (or a number) and a Chinese character. |
||||||||||||
|
|
||||||||||||
| ## 功能特点 | ||||||||||||
|
|
||||||||||||
| - **WAL分析**:Cloudberry中的`pg_waldump`功能允许用户解析和解码WAL文件,提供易于理解的日志数据格式。 | ||||||||||||
| - **多节点支持**:与PostgreSQL的单节点设置不同,Cloudberry的`pg_waldump`支持跨分布式节点分析WAL日志,适用于分布式数据库。 | ||||||||||||
| - **可定制输出**:输出格式可以根据用户偏好进行调整,包括日志的详细程度和特定数据点。 | ||||||||||||
| - **实时监控**:Cloudberry增强了`pg_waldump`的实时监控功能,允许用户实时跟踪WAL活动。 | ||||||||||||
| - **错误诊断**:该工具有助于识别WAL条目中的错误或异常,协助排查与数据库一致性和复制相关的问题。 | ||||||||||||
|
|
||||||||||||
| ## 使用方法 | ||||||||||||
|
|
||||||||||||
| 1. **访问pg_waldump**:使用命令行接口(CLI)连接到Cloudberry实例。 | ||||||||||||
| 2. **运行命令**:执行`pg_waldump`命令,并使用适当的选项开始分析WAL日志。基本示例如下: | ||||||||||||
| ```bash | ||||||||||||
| pg_waldump --nodes=node1,node2 --format=human --level=high | ||||||||||||
|
Comment on lines
+21
to
+22
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
|
||||||||||||
| ## 选项 | ||||||||||||
|
|
||||||||||||
| 以下是`pg_waldump`的常用选项: | ||||||||||||
|
|
||||||||||||
| - `-f, --format`: 输出格式(如纯文本、JSON)。 | ||||||||||||
| - `-p, --pagesize`: 设置WAL的页面大小。 | ||||||||||||
| - `-c, --cluster`: 分析特定的PostgreSQL集群。 | ||||||||||||
| - `-l, --list`: 列出可用的WAL段。 | ||||||||||||
| - `-s, --start`: WAL解码的起始点。 | ||||||||||||
| - `-e, --end`: WAL解码的结束点。 | ||||||||||||
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.