Repository navigation
Conversation
Closes IvorySQL#162 新增基于 Patroni 的 IvorySQL 高可用集群部署指南(英文+中文),内容涵盖 issue 要求的三部分:概述(Patroni 架构与 etcd DCS)、部署步骤、监控与维护, 并包含故障转移演练、同步复制权衡(synchronous_mode)、pg_rewind 说明、 生产环境清单(systemd/watchdog/HAProxy/TLS/三节点 etcd)与常见问题排查。 全部步骤在 IvorySQL 5beta1 (PostgreSQL 19beta1) + Patroni 4.1.5 + etcd 3.5 环境实测验证,包括:双节点流复制集群(streaming、lag=0)、 主库写入备库读取、pg_stat_replication 复制视图、Oracle 兼容函数经集群调用、 模拟主机宕机后的自动故障转移(时间线 1→2,约40秒完成切换)、故障节点 自动回归(跟随新时间线重新以 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
|
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, verificationuse_pg_rewindis needed), planned switchover, and the async-vs-synchronous_modedata-durability trade-offpatronictlcommand table, REST health endpoints, monitoring essentials/masterhealth check, control-plane TLS pointers, three-node etcdEverything 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). All command outputs in the doc are captured verbatim from that environment:
running+ Replicastreaming, lag 0pg_stat_replicationshowsstreaming | asyncsys.last_day→2024-02-29)synchronous_modewhen requiredstreamingIvorySQL-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.