KingbaseES V8R6集群同步模式synchronous参数配置详解
如下图所示:

集群数据同步原理说明:

synchronous参数配置测试:
集群节点信息:
ID | Name | Role | Status | Upstream | repmgrd | PID | Paused? | Upstream last seen
----+---------+---------+-----------+----------+---------+-------+---------+--------------------
1 | node101 | standby | running | node102 | running | 7345 | no | 1 second(s) ago
2 | node102 | primary | * running | | running | 13934 | no | n/a
数据库版本:
test=# select version();
version
----------------------------------------------------------------------------------------------------------------------
KingbaseES V008R006C005B0041 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46), 64-bit
(1 row)
一、配置synchronous='sync'
1、配置synchronous参数
[kingbase@node102 bin]$ cat ../etc/repmgr.conf |grep sync
#synchronous='quorum'
synchronous='sync'
2、查看流复制同步状态
test=# select * from sys_stat_replication;
pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | backend_xmin | state | sent_lsn | write_lsn | flush_lsn | replay_lsn | write_lag | flush_lag | replay_lag | sync_priority | sync_state | reply_time
-------+----------+---------+------------------+---------------+-----------------+-------------+-------------------------------+-------
10622 | 10 | system | node101 | 192.168.1.101 | | 19002 | 2022-04-27 00:29:19.703179+08 | | streaming | 0/400008E0 | 0/400008E0 | 0/400008E0 | 0/400008E0 | | | | 1 | sync | 2022-04-27 15:01:31.539178+08
(1 row)

3、查看kingbase.auto.conf配置
[kingbase@node102 bin]$ cat ../data/kingbase.auto.conf
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
enable_upper_colname = 'on'
primary_conninfo = 'user=system connect_timeout=10 host=192.168.1.101 port=54321 keepalives=1 keepalives_idle=10 keepalives_interval=1 keepalives_count=3 application_name=node102'
recovery_target_timeline = 'latest'
primary_slot_name = 'repmgr_slot_2'
wal_retrieve_retry_interval = '5000'
synchronous_standby_names = '1 (node101)'

二、配置synchronous='quorum'(默认)
1、配置synchronous参数
[kingbase@node102 bin]$ cat ../etc/repmgr.conf |grep sync
synchronous='quorum'
#synchronous='sync'
#synchronous='async'
2、查看流复制同步状态
test=# select * from sys_stat_replication;
pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | backend_xmin | state | sent_lsn | write_lsn | flush_lsn | replay_lsn | write_lag | flush_lag | replay_lag | sync_priority | sync_state | reply_time
-------+----------+---------+------------------+---------------+-----------------+-------------+-------------------------------+--------------+-----------+------------+------------+------------+------------+-----------+-----------+------------+---------------+------------+-------------------------------
16656 | 10 | system | node101 | 192.168.1.101 | | 19593 | 2022-04-27 00:37:24.155837+08 | | streaming | 0/42000960 | 0/42000960 | 0/42000960 | 0/42000960 | | | | 1 | quorum | 2022-04-27 15:09:06.702206+08
(1 row)

3、查看kingbase.auto.conf配置
[kingbase@node102 bin]$ cat ../data/kingbase.auto.conf
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
enable_upper_colname = 'on'
primary_conninfo = 'user=system connect_timeout=10 host=192.168.1.101 port=54321 keepalives=1 keepalives_idle=10 keepalives_interval=1 keepalives_count=3 application_name=node102'
recovery_target_timeline = 'latest'
primary_slot_name = 'repmgr_slot_2'
wal_retrieve_retry_interval = '5000'
synchronous_standby_names = 'ANY 1(node101)'

三、配置synchronous='async'(默认)
1、配置synchronous参数
[kingbase@node102 bin]$ cat ../etc/repmgr.conf |grep sync
#synchronous='quorum'
#synchronous='sync'
synchronous='async'
2、查看流复制同步状态
test=# select * from sys_stat_replication;
pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | backend_xmin | state | sent_lsn | write_lsn | flush_lsn | replay_lsn | write_lag | flush_lag | replay_lag | sync_priority | sync_state | reply_time
-------+----------+---------+------------------+---------------+-----------------+-------------+-------------------------------+--------------+-----------+------------+------------+------------+------------+-----------+-----------+------------+---------------+------------+-------------------------------
13720 | 10 | system | node101 | 192.168.1.101 | | 19317 | 2022-04-27 00:33:32.600138+08 | | streaming | 0/41000938 | 0/41000938 | 0/41000938 | 0/41000938 | | | | 0 | async | 2022-04-27 15:05:25.079617+08
(1 row)

3、查看kingbase.auto.conf配置
[kingbase@node102 bin]$ cat ../data/kingbase.auto.conf
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
enable_upper_colname = 'on'
primary_conninfo = 'user=system connect_timeout=10 host=192.168.1.101 port=54321 keepalives=1 keepalives_idle=10 keepalives_interval=1 keepalives_count=3 application_name=node102'
recovery_target_timeline = 'latest'
primary_slot_name = 'repmgr_slot_2'
wal_retrieve_retry_interval = '5000'
synchronous_standby_names = ''

KingbaseES V8R6集群同步模式synchronous参数配置详解的更多相关文章
- Vmware在NAT模式下网络配置详解
Vmware在NAT模式下网络配置详解 Linux中的网络配置对于接触Linux不久的小白菜来说,还是小有难度的,可能是不熟悉这种与windows系列迥然不同的命令行操作,也可能是由于对Linux的结 ...
- druid 参数配置详解
druid 参数配置详解 */--> druid 参数配置详解 Table of Contents 1. 初始化连接 2. 参数配置及说明 3. 注意事项 3.1. 底层连接 3.2. 空闲检查 ...
- logback 常用参数配置详解
logback 常用配置详解(二) <appender> <appender>: <appender>是<configuration>的子节点,是负责写 ...
- Nginx.conf参数配置详解
Nginx的配置文件nginx.conf配置详解如下: user nginx nginx; #Nginx用户及组:用户 组.window下不指定 worker_processes 8; #工作进程:数 ...
- Spark 性能相关参数配置详解-任务调度篇
随着Spark的逐渐成熟完善, 越来越多的可配置参数被添加到Spark中来, 本文试图通过阐述这其中部分参数的工作原理和配置思路, 和大家一起探讨一下如何根据实际场合对Spark进行配置优化. 由于篇 ...
- 深入剖析Redis系列: Redis集群模式搭建与原理详解
前言 在 Redis 3.0 之前,使用 哨兵(sentinel)机制来监控各个节点之间的状态.Redis Cluster 是 Redis 的 分布式解决方案,在 3.0 版本正式推出,有效地解决了 ...
- HDFS之三:hdfs参数配置详解
1.hdfs-site.xml 参数配置 – dfs.name.dir – NameNode 元数据存放位置 – 默认值:使用core-site.xml中的hadoop.tmp.dir/dfs/nam ...
- xheditor的参数配置详解
2.2. 初始化参数列表 2.3. API函数接口列表 2.4. 上传程序开发规范 2.5. 插件开发指南 2.6. 皮肤设计指南 2.2. 初始化参数列表 初始化参数示例代码: $('#elm1') ...
- datatables参数配置详解
//@translator codepiano //@blog codepiano //@email codepiano.li@gmail.com //尝试着翻译了一下,难免有错误的地方,欢迎发邮件告 ...
随机推荐
- 程序员必备,一款让你提高工作效率N倍的神器uTools
下载地址:https://www.aliyundrive.com/s/f7PU7QxdxEz uTools 是什么? uTools = your tools(你的工具集) uTools 是一个极简.插 ...
- UiPathExcel写入操作
一.Excel 写操作 1.写一个单元格 (1)控件介绍 Write Cell: 使用Write Cell控件,在指定单元格写入内容 常用属性介绍: Destination: Cell: 要写 ...
- 论文解读(GCC)《Efficient Graph Convolution for Joint Node RepresentationLearning and Clustering》
论文信息 论文标题:Efficient Graph Convolution for Joint Node RepresentationLearning and Clustering论文作者:Chaki ...
- 自定义 systemd service
Red Hat Linux 自 7 版本后 采用systemd 形式取代原先 init ,用户可以参考 系统service 创建自己的service ,以便于日常统一管理,系统service 存储路径 ...
- 一网打尽异步神器CompletableFuture
最近一直畅游在RocketMQ的源码中,发现在RocketMQ中很多地方都使用到了CompletableFuture,所以今天就跟大家来聊一聊JDK1.8提供的异步神器CompletableFutur ...
- PTA(BasicLevel)-1023 组个最小数
一. 问题定义 给定数字 0-9 各若干个.你可以以任意顺序排列这些数字,但必须全部使用.目标是使得最后得到的数尽可能小(注意 0 不能做首位). 例如:给定两个 0,两个 1,三个 5,一个 8,我 ...
- 静态static关键字概述和静态static关键字修饰成员变量
static关键字 概述 关于 static 关键字的使用,它可以用来修饰的成员变量和成员方法,被修饰的成员是属于类的,而不是单单是属 于某个对象的.也就是说,既然属于类,就可以不靠创建对象来调用了 ...
- 如何用Python实现配置热加载?
背景 由于最近工作需求,需要在已有项目添加一个新功能,实现配置热加载的功能.所谓的配置热加载,也就是说当服务收到配置更新消息之后,我们不用重启服务就可以使用最新的配置去执行任务. 如何实现 下面我分别 ...
- android studio取消设置代理
看标题感觉就是一个简单的设置,其实只是个大坑啊 https://www.jianshu.com/p/bb6d2bcdd5b5 android studio内虽然设置了 no proxy,但是没起作用, ...
- 常用API(Java)
常用API Object toString方法 场景:当我们使用toString方法想要输出对象变量时,官方提供的toString方法会直接输出对象所在的地址,而不是我们想要的对象变量,所以我们要把t ...