1 Star 0 Fork 29

april01xxx / PolarDB-for-PostgreSQL

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
parallel_redo.md 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
le.cai 提交于 2021-05-27 00:34 . First commit

Parallel WAL redo

In order to speed up WAL redo for recovery and replication, PolarDB for PG implements a parallel WAL redo mechanism. PolarDB for PG supports two forms of parallelism: table-level and page-level, which however reuse the same parallel framework. Specifically, PolarDB for PG creates a specified number of workers for parallel replaying. The main process reads WAL records from WAL continously and dispaches them to parallel workers for replaying. The main process communicates with the workers through shared-memory queues (shm) and uses batching to reduce the communication overhead. Our current parallel replaying does not support hot-standby repliation due to the adoption of batching.

How to use

  1. You should set the guc parameter of max_parallel_replay_workers with a value greater than 0 to enable parallel WAL redo.
  2. You can set enable_parallel_recovery_bypage to be true to enable page-level parallel redo.
  3. You can use parallel redo even in the case of hot-standby replication if the parameter allow_hot_standby_inconsistency is set.

Copyright © Alibaba Group, Inc.

C++
1
https://gitee.com/april01xxx/PolarDB-for-PostgreSQL.git
git@gitee.com:april01xxx/PolarDB-for-PostgreSQL.git
april01xxx
PolarDB-for-PostgreSQL
PolarDB-for-PostgreSQL
master

搜索帮助