i
目录
一、 主机拓扑结构信息 ............................................................................................................................1
1. 版本信息 ..........................................................................................................................................1
2. 主机信息 ..........................................................................................................................................1
3. 拓扑结构 ..........................................................................................................................................1
二、 安装配置集群 .....................................................................................................................................1
1. 安装初始化pg ...............................................................................................................................1
1) 安装步骤 ..........................................................................................................................................1
2) 建立归档目录 ................................................................................................................................2
2. 数据库配置 .....................................................................................................................................2
1) 创建复制用户 ................................................................................................................................2
2) 修改数据库配置 ............................................................................................................................3
a. postgresql.conf .........................................................................................................................3
b. pg_hba.conf ...................................................................................................................................5
3) restart database .......................................................................................................................5
3. sync slave配置 ...........................................................................................................................5
1) 停止数据库 .....................................................................................................................................5
2) 清空pgdata目录 .........................................................................................................................5
3) 配置 sync standby .....................................................................................................................5
4) 配置恢复同步与切换...................................................................................................................6
5) 启动sync slave ...........................................................................................................................6
4. async slave 配置 .......................................................................................................................7
1) 停止数据库 .....................................................................................................................................7
2) 清空pgdata目录 .........................................................................................................................7
3) 配置async slave ........................................................................................................................7
4) 配置 wal时间线切换 .................................................................................................................8
5) 启动 async standby...................................................................................................................8
5. 检查replication状态 ..............................................................................................................8
1) primary ............................................................................................................................................8
2) sync standby ............................................................................................................................. 10
3) async standby ........................................................................................................................... 12
文档被以下合辑收录
评论