From 0e17fad99098c7f82bced5d958a2c2cefcf0fa09 Mon Sep 17 00:00:00 2001 From: FionaWang Date: Wed, 12 Feb 2025 12:10:17 +0800 Subject: [PATCH 1/4] Add doc about pg_waldump Adding a descriptive documentation draft about the pg_waldump functionality for testing purposes. --- docs/pg_waldump_en.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docs/pg_waldump_en.md diff --git a/docs/pg_waldump_en.md b/docs/pg_waldump_en.md new file mode 100644 index 00000000000..5cf4098165d --- /dev/null +++ b/docs/pg_waldump_en.md @@ -0,0 +1,18 @@ +# 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 From 62e2ec191308797dc2d2e044802472e1a664cf0c Mon Sep 17 00:00:00 2001 From: FionaWang Date: Wed, 12 Feb 2025 12:14:24 +0800 Subject: [PATCH 2/4] Add CN doc about pg_waldump Adding a descriptive documentation draft about the pg_waldump functionality for testing purposes. - Chinese version --- .../current/pg_waldump_cn.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/pg_waldump_cn.md 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..9b92b91570f --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pg_waldump_cn.md @@ -0,0 +1,22 @@ + +### 中文版本: 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 From 28aa93cb6809e080cc6993238e235cc247af65a1 Mon Sep 17 00:00:00 2001 From: FionaWang Date: Wed, 12 Feb 2025 12:47:38 +0800 Subject: [PATCH 3/4] Update pg_waldump_en.md Add common options for reference --- docs/pg_waldump_en.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/pg_waldump_en.md b/docs/pg_waldump_en.md index 5cf4098165d..2dc7b901554 100644 --- a/docs/pg_waldump_en.md +++ b/docs/pg_waldump_en.md @@ -16,3 +16,14 @@ Apache Cloudberry offers a robust mechanism for inspecting Write-Ahead Log (WAL) 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. From b6a467ce96103e238eaa817284a614a9faf62860 Mon Sep 17 00:00:00 2001 From: FionaWang Date: Wed, 12 Feb 2025 12:50:03 +0800 Subject: [PATCH 4/4] Update pg_waldump_cn.md Add common options --- .../current/pg_waldump_cn.md | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 index 9b92b91570f..a72c84e941f 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/pg_waldump_cn.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/pg_waldump_cn.md @@ -20,3 +20,14 @@ Apache Cloudberry提供了一种强大的机制,用于检查预写日志(WAL 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解码的结束点。