diff --git a/docs/pg_waldump_en.md b/docs/pg_waldump_en.md new file mode 100644 index 00000000000..2dc7b901554 --- /dev/null +++ b/docs/pg_waldump_en.md @@ -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 + +## 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. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/pg_waldump_cn.md b/i18n/zh/docusaurus-plugin-content-docs/current/pg_waldump_cn.md new file mode 100644 index 00000000000..a72c84e941f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pg_waldump_cn.md @@ -0,0 +1,33 @@ + +### 中文版本: Apache Cloudberry中的pg_waldump + +```markdown +# Apache Cloudberry中的pg_waldump + +Apache Cloudberry提供了一种强大的机制,用于检查预写日志(WAL)文件,帮助用户分析数据库变化、跟踪操作以及诊断问题。Cloudberry中的`pg_waldump`功能模仿了PostgreSQL中的`pg_waldump`工具,但针对Cloudberry的分布式架构进行了增强。 + +## 功能特点 + +- **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 + +## 选项 + +以下是`pg_waldump`的常用选项: + +- `-f, --format`: 输出格式(如纯文本、JSON)。 +- `-p, --pagesize`: 设置WAL的页面大小。 +- `-c, --cluster`: 分析特定的PostgreSQL集群。 +- `-l, --list`: 列出可用的WAL段。 +- `-s, --start`: WAL解码的起始点。 +- `-e, --end`: WAL解码的结束点。