Repository navigation
Conversation
Closes IvorySQL#162 新增基于 Patroni 的 IvorySQL 高可用集群部署指南(英文+中文),内容涵盖 issue 要求的三部分:概述(Patroni 架构与 etcd DCS)、部署步骤、监控与维护, 并补充了故障转移演练与常见问题排查。 全部步骤在 IvorySQL 5beta1 (PostgreSQL 19beta1) + Patroni 4.1.5 + etcd 3.5 环境实测验证,包括:双节点流复制集群搭建(streaming、lag=0)、 主库写入备库读取验证、pg_stat_replication 复制视图、Oracle 兼容函数 经集群调用、模拟主机宕机后的自动故障转移(时间线 1→2,约40秒完成切换, 数据零丢失)、故障节点自动回归(rewind 后重新以 streaming 加入)。 文档同时记录了 IvorySQL 多实例同机部署的三个关键注意事项: - ivorysql.port(Oracle 兼容端口,默认1521)与 unix_socket_directories 必须逐节点唯一,否则触发 socket 锁冲突 FATAL; - Patroni 4.x 要求 postgresql.listen 必填; - 数据目录必须 0700 权限(pg_basebackup 不会收紧预建目录权限)。 Signed-off-by: zhang1939 <13942782872@163.com>
|
🚀 IvorySQL-Docs Preview Ready
|
- Qualify the failover data-loss statement: async replication does not
guarantee zero loss by itself; document synchronous_mode /
synchronous_mode_strict as the zero-loss option with its trade-offs
- Fix the pkill example ('patroni node1.yml' cannot match the started
command line; use 'patroni.*node1.yml')
- Replace the shortened patronictl outputs with verbatim captures
(cluster id, Receive/Replay LSN columns) and state that outputs are
captured verbatim from the verification host
- Fix the rejoin wording: the observed behavior is timeline follow, not
pg_rewind; document when pg_rewind (use_pg_rewind: true) is required
- Add a Production Checklist section: systemd unit, watchdog, HAProxy
with /master health check, control-plane TLS, three-node etcd
Signed-off-by: zhang1939 <13942782872@163.com>
|
🚀 IvorySQL-Docs Preview Ready
|
Author
|
Closing this in favor of a resubmission with a single clean commit (same content, review feedback already incorporated). |
This branch was previously deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #162
Adds a new "High Availability Deployment with Patroni" guide in both English and Chinese (
EN/modules/ROOT/pages/master/high_availability_patroni.adoc+CN/...), plus navigation entries. It covers the three areas requested by the issue:Contents
patroni.ymlfor two nodes, cluster bootstrap, verificationpatronictlcommand table, REST health endpoints, monitoring essentialsEverything was verified live
The whole guide was executed end-to-end on IvorySQL 5beta1 (PostgreSQL 19beta1) + Patroni 4.1.5 + etcd 3.5 (Ubuntu, two IvorySQL instances on one host). Outputs in the doc are real:
running+ Replicastreaming, lag 0pg_stat_replicationshowsstreaming | asyncsys.last_day→2024-02-29)streamingIvorySQL-specific notes included
Three gotchas documented that are easy to hit when running multiple IvorySQL instances (each verified during the test):
port+ivorysql.port, default 1521) — both must be unique per node or startup fails with a socket-lock FATAL;postgresql.listen;0700beforepg_basebackupjoins a node.