【DB宝99】TDSQL for PostgreSQL(原 TBase)集群安装
简介
2020年12月腾讯云数据库品牌升级,腾讯云原有的TDSQL、TBase、CynosDB三大产品线将统一升级为“腾讯云企业级分布式数据库TDSQL”。全新升级后的腾讯云TDSQL将涵盖分布式、分析型、云原生等多引擎融合的完整数据库产品体系。
TDSQL MySQL版为原TDSQL,TDSQL PostgreSQL版为原TBase OLTP版及HTAP版;TDSQL-A PostgreSQL 版为原TBase OLAP版,并新增 ClickHouse 版;TDSQL-C为原CynosDB。
TDSQL MySQL版是基于 MariaDB 内核 ,结合 mysql-proxy、ZooKeeper 等开源组件实现的数据库集群系统,并且基于 MySQL 半同步的机制。
拥有自主研发的企业级分布式数据库TDSQL,100%兼容MySQL和PostgreSQL,Oracle兼容性达95%以上,包含三大产品系列,分别为分析型数据库TDSQL-A (Tencent Analytical Database)、云原生数据库TDSQL-C (Tencent CloudNative Database)和分布式数据库TDSQL (Tencent DistributedDatabase),全方位满足政企业务需求。
TDSQL for MySQL
https://cloud.tencent.com/product/dcdb
TDSQL MySQL 版(TDSQL for MySQL)是腾讯打造的一款分布式数据库产品,具备强一致高可用、全球部署架构、分布式水平扩展、高性能、企业级安全等特性,同时提供智能 DBA、自动化运营、监控告警等配套设施,为客户提供完整的分布式数据库解决方案。目前 TDSQL 已经为超过500+的政企和金融机构提供数据库的公有云及私有云服务,客户覆盖银行、保险、证券、互联网金融、计费、第三方支付、物联网、互联网+、政务等领域。TDSQL MySQL 版亦凭借其高质量的产品及服务,获得了多项国际和国家认证,得到了客户及行业的一致认可。
TDSQL for PostgreSQL, 原 TBase(开源)
官网:http://tbase.qq.com 、 https://cloud.tencent.com/product/tbase
GitHub:http://github.com/Tencent/TBase
文档:https://github.com/Tencent/TBase/wiki/
TBase is an enterprise-level distributed HTAP database. Through a single database cluster to provide users with highly consistent distributed database services and high-performance data warehouse services, a set of integrated enterprise-level solutions is formed.
TDSQL PostgreSQL 版(TDSQL for PostgreSQL, 原 TBase)是腾讯自主研发的分布式数据库系统,具备高 SQL 兼容度、完整分布式事务、高安全、高扩展、多级容灾等能力,成功应用在金融、政府、电信等行业核心业务中。同时提供完善的容灾、备份、监控、审计等全套方案,适用于GB~PB级海量 HTAP 场景。
产品特性
TDSQL PostgreSQL 版适用于哪些业务场景?
HTAP 业务系统:在数据库系统应用中,OLTP 场景涉及数据量小,但对返回实时性要求高;OLAP 类场景涉及的数据量和计算量大,但是对实时性要求不高。一套系统里能同时覆盖 OLTP 以及 OLAP 场景是业务对数据库系统的一个很强烈的诉求,TDSQL PostgreSQL 版 特有的架构设计,刚好满足此诉求,且已经有了不少的 HTAP 业务场景的落地案例。
物联网地理信息系统:在物联网场景中,很多的传感器接入数据(热点 WIFI 数据、车辆行驶数轨迹数据等)都包含一些点位信息(经度和纬度)。TDSQL PostgreSQL 版结合这些位置信息和已有的地理信息进行关联分析,可以得到价值很高的数据。TDSQL PostgreSQL 版支持最先进的开源地理信息引擎 PostGIS,可以提供丰富高效的地理信息处理能力。
实时高并发事务系统:互联网、移动话联网、电商等业务的蓬勃发展,使客户量不断增长,业务核心系统需经受高并发访问的考验。TDSQL PostgreSQL 版的 share nothing 架构可以在线平滑地扩展实例规模,从容应对此类场景;同时,TDSQL PostgreSQL 版提供的分布式事务一致性能力能保证高并发场景下的分布式系统事务一致性。
TDSQL PostgreSQL 版的 SQL 兼容度如何?
TDSQL PostgreSQL 版兼容绝大多数的 PostgreSQL 语法,包括复杂查询、外键、触发器、视图、存储过程等等,满足大部分企业用户的诉求。同时,TDSQL PostgreSQL 版还兼容大部分的 Oracle 类型、函数,用户可轻松将 Oracle 业务迁移到 TDSQL PostgreSQL 版中。
数据库架构
TDSQL PostgreSQL版 采用无共享 share nothing 架构。数据库实例分为三种节点:
协调节点(Coordinator,CN):是数据库服务的对外入口即业务访问入口,负责数据的分发和查询规划,多个节点位置对等。在功能上CN上只存储系统的全局元数据,并不存储实际的业务数据。
数据节点(Datanode,DN) :负责执行协调节点分发的执行请求,实际存储业务数据。
全局事务管理器(GlobalTransactionManager,GTM):负责全局事务管理,同时管理集群的全局对象,比如序列等。
TDSQL PostgreSQL版 数据节点部署在强大硬件之上,底层存储使用本地 NVMe SSD 硬盘,提供强大的 IO 性能。
常见问题
https://cloud.tencent.com/document/product/1129/37327
Oracle 数据库能迁移至 TDSQL PostgreSQL版 数据库吗?
TDSQL PostgreSQL版 作为去 O 的最佳选择之一,支持复杂子查询、存储过程、窗口函数等很多企业级的特性,并在内核级支持很多 Oracle 语法以及函数,使得业务代码几乎不用进行修改或极少的修改便能够在 TDSQL 上实现业务的快速迁移。
具体的 Oracle 兼容性说明请参见 Oracle 兼容语法。
TDSQL PostgreSQL版 对 PostgreSQL 的兼容度如何?
在功能上,TDSQL PostgreSQL版 与 PostgreSQL 一样实现了 SQL 2011 标准所规定的大部分功能,支持 SELECT、UPDATE、INSERT、JOIN、GROUP BY 等基础功能,以及支持外键约束、check、主键、触发器、视图、存储过程、多级事务、多版本并发控制等高级功能。
在数据类型上,TDSQL PostgreSQL版 支持常见的数字、字符串,时间类型,以及支持自增序列、货币、几何、UUID、Array、JSON、Range等类型。
在接口上,TDSQL PostgreSQL版 支持 JDBC、ODBC、shell、C、Python、PHP、.NET 等大多数语言的 API。
用户完全可以像使用单机 PostgreSQL 一样使用 TDSQL PostgreSQL版,无需额外的学习成本。
TDSQL PostgreSQL版 支持强同步复制吗?
支持。强同步复制是在节点级保证每个节点的主从数据完全一致,是整个容灾体系的基础,在主节点故障发生时,数据库可以切换到从机提供服务并且无任何数据丢失。
TDSQL PostgreSQL版 如何进行高效的分布式 JOIN?
在执行方式上,协调节点接收到用户的 SQL 请求,根据收集的集群统计信息,生成最优的集群级分布式查询计划,并下发到参与计算的数据节点上进行执行,即协调节点下发的是执行计划,数据节点负责执行该计划。
在数据交互上,数据节点之间建立了高效数据交换通道,可以高效的进行交换数据,数据交换的过程在 TDSQL PostgreSQL版 里称之数据重分布(Data Redistribution)。
基于高效的全局查询计划和数据重分布的技术支撑,TDSQL PostgreSQL版 能充分发挥并行计算的优势,高效完成 JOIN 过程。
TDSQL PostgreSQL版 支持审计吗?
支持。TDSQL PostgreSQL版 从多个维度提供全方位的审计能力,审计采用旁路检测方式,对数据库运行影响极小。
参考
https://cloud.tencent.com/developer/article/1635680
https://cloud.tencent.com/developer/article/1847790
TDSQL for PostgreSQL(原 TBase)集群安装
环境申请
节点名称 | IP | port | 数据目录 |
---|---|---|---|
GTM主机 | 172.72.6.100 | 5001 | /data/tbase/gtm |
GTM从机 | 172.72.6.101 | 5001 | /data/tbase/gtm |
CN1 | 172.72.6.100 | 3004 | /data/tbase/coord |
CN2 | 172.72.6.101 | 3004 | /data/tbase/coord |
DN1主 | 172.72.6.100 | 4004 | /data/tbase/dn001 |
DN1从 | 172.72.6.101 | 5004 | /data/tbase/dn001 |
DN2主 | 172.72.6.101 | 4004 | /data/tbase/dn002 |
DN2从 | 172.72.6.100 | 5004 | /data/tbase/dn002 |
1-- 网卡
2docker network create --subnet=172.72.6.0/24 pg-network
3
4
5docker rm -f lhrtbase100
6docker run -d --name lhrtbase100 -h lhrtbase100 \
7 --net=pg-network --ip 172.72.6.100 \
8 -p 64003:30004 -p 64004:40004 \
9 -v /sys/fs/cgroup:/sys/fs/cgroup \
10 --privileged=true lhrbest/lhrcentos76:8.8 \
11 /usr/sbin/init
12
13
14docker rm -f lhrtbase101
15docker run -d --name lhrtbase101 -h lhrtbase101 \
16 --net=pg-network --ip 172.72.6.101 \
17 -p 64005:30004 -p 64006:40004 \
18 -v /sys/fs/cgroup:/sys/fs/cgroup \
19 --privileged=true lhrbest/lhrcentos76:8.8 \
20 /usr/sbin/init
基本配置
所有节点都需要操作:
1yum install -y git readline-devel uuid zlib zlib-devel openssl-devel bison gcc gcc-g++ make flex flex-devel uuid-devel
2
3
4useradd tbase
5mkdir -p /opt/tbase
6mkdir -p /data/tbase
7chown -R tbase.tbase /opt/tbase
8chown -R tbase.tbase /data/tbase
9
10echo "tbase:lhr" | chpasswd
11
12
13cat >> /home/tbase/.bashrc << 'EOF'
14export TBASE_HOME=/opt/tbase
15export PATH="$PATH:$TBASE_HOME/bin"
16export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TBASE_HOME/lib"
17EOF
18source /home/tbase/.bashrc
编译安装TBase
只在节点1操作:
1cd /soft
2git clone https://github.com/Tencent/TBase
3cd TBase/
4chmod +x configure*
5./configure --prefix=/opt/tbase --enable-user-switch --with-openssl --with-ossp-uuid CFLAGS=-g
6make clean
7make -sj
8make install
9chmod +x contrib/pgxc_ctl/make_signature
10cd contrib
11make -sj
12make install
配置ssh互信
只在节点1操作:
1./sshUserSetup.sh -user tbase -hosts "lhrtbase100 lhrtbase101" -advanced exverify -confirm
2
3
4sudo chmod 600 /home/tbase/.ssh/config
集群安装
只在节点1操作:
1cat > /tmp/pgxc_ctl.conf <<"EOF00"
2
3#!/bin/bash
4m1=172.72.6.100
5m2=172.72.6.101
6pgxcInstallDir=/opt/tbase
7pgxcOwner=tbase
8defaultDatabase=postgres
9pgxcUser=$pgxcOwner
10tmpDir=/tmp
11localTmpDir=$tmpDir
12configBackup=n
13configBackupHost=pgxc-linker
14configBackupDir=$HOME/pgxc
15configBackupFile=pgxc_ctl.bak
16
17
18#---- GTM ----------
19gtmName=gtm
20gtmMasterServer=$m1
21gtmMasterPort=50001
22gtmMasterDir=/data/tbase/gtm
23gtmExtraConfig=none
24gtmMasterSpecificExtraConfig=none
25gtmSlave=y
26# 新增,否则slave配置中为null
27gtmSlaveName=gtm
28gtmSlaveServer=$m2
29gtmSlavePort=50001
30gtmSlaveDir=/data/tbase/gtm
31gtmSlaveSpecificExtraConfig=none
32
33#---- Coordinators -------
34coordMasterDir=/data/tbase/coord
35coordArchLogDir=/data/tbase/coord_archlog
36
37coordNames=(cn001 cn002 )
38coordPorts=(30004 30004 )
39poolerPorts=(31110 31110 )
40coordPgHbaEntries=(0.0.0.0/0)
41coordMasterServers=($m1 $m2)
42coordMasterDirs=($coordMasterDir $coordMasterDir)
43coordMaxWALsernder=2
44coordMaxWALSenders=($coordMaxWALsernder $coordMaxWALsernder )
45coordSlave=n
46coordSlaveSync=n
47coordArchLogDirs=($coordArchLogDir $coordArchLogDir)
48
49coordExtraConfig=coordExtraConfig
50cat > $coordExtraConfig <<EOF
51#================================================
52# Added to all the coordinator postgresql.conf
53# Original: $coordExtraConfig
54# 此处适应性修改后 dn slave可正常启动
55listen_addresses = '0.0.0.0'
56max_connections = 500
57max_pool_size = 65535
58shared_buffers = 1GB
59max_prepared_transactions = 2000
60maintenance_work_mem = 256MB
61wal_level = logical
62max_wal_senders = 64
63max_wal_size = 1GB
64min_wal_size = 256MB
65log_destination = 'csvlog'
66logging_collector = on
67log_directory = 'log'
68log_filename = 'postgresql-%A-%H.log'
69synchronous_commit = local
70synchronous_standby_names = ''
71
72EOF
73
74coordSpecificExtraConfig=(none none)
75coordExtraPgHba=coordExtraPgHba
76cat > $coordExtraPgHba <<EOF
77local all all trust
78host all all 0.0.0.0/0 trust
79host replication all 0.0.0.0/0 trust
80host all all ::1/128 trust
81host replication all ::1/128 trust
82host replication all $m1/32 trust
83host all all $m1/32 trust
84host replication all $m2/32 trust
85host all all $m2/32 trust
86host all all 0.0.0.0/0 md5
87
88EOF
89
90coordSpecificExtraPgHba=(none none)
91coordAdditionalSlaves=n
92cad1_Sync=n
93
94#---- Datanodes ---------------------
95dn1MstrDir=/data/tbase/dn001
96dn2MstrDir=/data/tbase/dn002
97dn1SlvDir=/data/tbase/dn001
98dn2SlvDir=/data/tbase/dn002
99dn1ALDir=/data/tbase/datanode_archlog
100dn2ALDir=/data/tbase/datanode_archlog
101
102primaryDatanode=dn001
103datanodeNames=(dn001 dn002)
104datanodePorts=(40004 40004)
105datanodePoolerPorts=(41110 41110)
106datanodePgHbaEntries=(0.0.0.0/0)
107datanodeMasterServers=($m1 $m2)
108datanodeMasterDirs=($dn1MstrDir $dn2MstrDir)
109dnWALSndr=4
110datanodeMaxWALSenders=($dnWALSndr $dnWALSndr)
111
112datanodeSlave=y
113datanodeSlaveServers=($m2 $m1)
114datanodeSlavePorts=(50004 50004)
115datanodeSlavePoolerPorts=(51110 51110)
116datanodeSlaveSync=n
117datanodeSlaveDirs=($dn1SlvDir $dn2SlvDir)
118datanodeArchLogDirs=($dn1ALDir/dn001 $dn2ALDir/dn002)
119
120datanodeExtraConfig=datanodeExtraConfig
121cat > $datanodeExtraConfig <<EOF
122#================================================
123# Added to all the coordinator postgresql.conf
124# Original: $datanodeExtraConfig
125# 此处适应性修改后 dn slave可正常启动
126listen_addresses = '0.0.0.0'
127max_connections = 500
128max_pool_size = 65535
129shared_buffers = 1GB
130max_prepared_transactions = 2000
131maintenance_work_mem = 256MB
132wal_level = logical
133max_wal_senders = 64
134max_wal_size = 1GB
135min_wal_size = 256MB
136log_destination = 'csvlog'
137logging_collector = on
138log_directory = 'log'
139log_filename = 'postgresql-%A-%H.log'
140synchronous_commit = local
141synchronous_standby_names = ''
142
143EOF
144
145datanodeSpecificExtraConfig=(none none)
146datanodeExtraPgHba=datanodeExtraPgHba
147cat > $datanodeExtraPgHba <<EOF
148
149local all all trust
150host all all 0.0.0.0/0 trust
151host replication all 0.0.0.0/0 trust
152host all all ::1/128 trust
153host replication all ::1/128 trust
154host replication all $m1/32 trust
155host all all $m1/32 trust
156host replication all $m2/32 trust
157host all all $m2/32 trust
158host all all 0.0.0.0/0 md5
159
160EOF
161
162datanodeSpecificExtraPgHba=(none none)
163
164datanodeAdditionalSlaves=n
165walArchive=n
166
167
168EOF00
初始化数据库
只在节点1操作:
1# 分发二进制包:在一个节点配置好配置文件后,需要预先将二进制包部署到所有节点所在的机器上,这个可以使用pgxc_ctl工具,执行deploy all命令来完成。
2pgxc_ctl -c /tmp/pgxc_ctl.conf
3
4
5# 二进制分发
6> deploy all
7# 集群初始化
8> init all
9# 显示配置
10> show config all
11# 启停服务
12> stop all -m fast
13> start all
14# 监控集群
15> monitor all
16# 清除集群:用于重新部署
17> clean all
18
19
20-- d
21[root@lhrtbase101 tbase]# netstat -tulnp | grep "gtm\|postgres"
22tcp 0 0 0.0.0.0:50004 0.0.0.0:* LISTEN 25052/postgres
23tcp 0 0 0.0.0.0:30004 0.0.0.0:* LISTEN 6094/postgres
24tcp 0 0 0.0.0.0:40004 0.0.0.0:* LISTEN 15412/postgres
25tcp 0 0 0.0.0.0:50001 0.0.0.0:* LISTEN 5599/gtm
26tcp6 0 0 :::30004 :::* LISTEN 6094/postgres
27tcp6 0 0 :::40004 :::* LISTEN 15412/postgres
28tcp6 0 0 :::50001 :::* LISTEN 5599/gtm
过程:
1[tbase@lhrtbase100 ~]$ pgxc_ctl --help
2/usr/bin/bash
3pgxc_ctl [option ...] [command]
4option:
5 -c or --configuration conf_file: Specify configruration file.
6 -v or --verbose: Specify verbose output.
7 -V or --version: Print version and exit.
8 -l or --logdir log_directory: specifies what directory to write logs.
9 -L or --logfile log_file: Specifies log file.
10 --home home_direcotry: Specifies pgxc_ctl work director.
11 -i or --infile input_file: Specifies inptut file.
12 -o or --outfile output_file: Specifies output file.
13 -h or --help: Prints this message and exits.
14For more deatils, refer to pgxc_ctl reference manual included in
15postgres-xc reference manual.
16[tbase@lhrtbase100 ~]$ pgxc_ctl -c /tmp/pgxc_ctl.conf
17/usr/bin/bash
18Installing pgxc_ctl_bash script as /home/tbase/pgxc_ctl/pgxc_ctl_bash.
19Installing pgxc_ctl_bash script as /home/tbase/pgxc_ctl/pgxc_ctl_bash.
20Reading configuration using /home/tbase/pgxc_ctl/pgxc_ctl_bash --home /home/tbase/pgxc_ctl --configuration /tmp/pgxc_ctl.conf
21Finished reading configuration.
22 ******** PGXC_CTL START ***************
23
24Current directory: /home/tbase/pgxc_ctl
25PGXC deploy all
26Deploying Postgres-XL components to all the target servers.
27Prepare tarball to deploy ...
28Deploying to the server 172.72.6.100.
29Deploying to the server 172.72.6.101.
30Deployment done.
31PGXC init all
32Initialize GTM master
33The files belonging to this GTM system will be owned by user "tbase".
34This user must also own the server process.
35
36
37fixing permissions on existing directory /data/tbase/gtm ... ok
38creating configuration files ... ok
39creating xlog dir ... ok
40
41Success.
424260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData context:
43LOCATION: GTM_PrintControlData, gtm_xlog.c:2055
444260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData->gtm_control_version = 20180716
45LOCATION: GTM_PrintControlData, gtm_xlog.c:2056
464260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData->xlog_seg_size = 2097152
47LOCATION: GTM_PrintControlData, gtm_xlog.c:2057
484260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData->xlog_blcksz = 4096
49LOCATION: GTM_PrintControlData, gtm_xlog.c:2058
504260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData->state = 1
51LOCATION: GTM_PrintControlData, gtm_xlog.c:2059
524260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData->CurrBytePos = 4080
53LOCATION: GTM_PrintControlData, gtm_xlog.c:2060
544260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData->PrevBytePos = 4080
55LOCATION: GTM_PrintControlData, gtm_xlog.c:2061
564260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData->thisTimeLineID = 1
57LOCATION: GTM_PrintControlData, gtm_xlog.c:2062
584260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData->prevCheckPoint = 0/0
59LOCATION: GTM_PrintControlData, gtm_xlog.c:2063
604260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData->checkPoint = 0/1000
61LOCATION: GTM_PrintControlData, gtm_xlog.c:2064
624260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData->gts = 1000000000
63LOCATION: GTM_PrintControlData, gtm_xlog.c:2065
644260030272:2022-04-11 16:34:54.359 CST -LOG: ControlData->time = 1649666094
65LOCATION: GTM_PrintControlData, gtm_xlog.c:2066
66waiting for server to shut down.....TBase create 15 worker thread.
67Start sever loop start thread count 24 running thread count 24.
68TBase GTM is ready to go!!
69 done
70server stopped
71Done.
72Start GTM master
73server starting
743935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData context:
75LOCATION: GTM_PrintControlData, gtm_xlog.c:2055
763935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData->gtm_control_version = 20180716
77LOCATION: GTM_PrintControlData, gtm_xlog.c:2056
783935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData->xlog_seg_size = 2097152
79LOCATION: GTM_PrintControlData, gtm_xlog.c:2057
803935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData->xlog_blcksz = 4096
81LOCATION: GTM_PrintControlData, gtm_xlog.c:2058
823935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData->state = 1
83LOCATION: GTM_PrintControlData, gtm_xlog.c:2059
843935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData->CurrBytePos = 4178000
85LOCATION: GTM_PrintControlData, gtm_xlog.c:2060
863935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData->PrevBytePos = 4177920
87LOCATION: GTM_PrintControlData, gtm_xlog.c:2061
883935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData->thisTimeLineID = 1
89LOCATION: GTM_PrintControlData, gtm_xlog.c:2062
903935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData->prevCheckPoint = 0/200000
91LOCATION: GTM_PrintControlData, gtm_xlog.c:2063
923935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData->checkPoint = 0/400000
93LOCATION: GTM_PrintControlData, gtm_xlog.c:2064
943935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData->gts = 1301235568
95LOCATION: GTM_PrintControlData, gtm_xlog.c:2065
963935549248:2022-04-11 16:34:58.522 CST -LOG: ControlData->time = 1649666096
97LOCATION: GTM_PrintControlData, gtm_xlog.c:2066
98Initialize GTM slave
99The files belonging to this GTM system will be owned by user "tbase".
100This user must also own the server process.
101
102
103fixing permissions on existing directory /data/tbase/gtm ... ok
104creating configuration files ... ok
105creating xlog dir ... ok
106
107Success.
108Done.
109Start GTM slaveserver starting
110236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData context:
111LOCATION: GTM_PrintControlData, gtm_xlog.c:2055
112236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->gtm_control_version = 20180716
113LOCATION: GTM_PrintControlData, gtm_xlog.c:2056
114236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->xlog_seg_size = 2097152
115LOCATION: GTM_PrintControlData, gtm_xlog.c:2057
116236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->xlog_blcksz = 4096
117LOCATION: GTM_PrintControlData, gtm_xlog.c:2058
118236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->state = 1
119LOCATION: GTM_PrintControlData, gtm_xlog.c:2059
120236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->CurrBytePos = 4080
121LOCATION: GTM_PrintControlData, gtm_xlog.c:2060
122236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->PrevBytePos = 4080
123LOCATION: GTM_PrintControlData, gtm_xlog.c:2061
124236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->thisTimeLineID = 1
125LOCATION: GTM_PrintControlData, gtm_xlog.c:2062
126236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->prevCheckPoint = 0/0
127LOCATION: GTM_PrintControlData, gtm_xlog.c:2063
128236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->checkPoint = 0/1000
129LOCATION: GTM_PrintControlData, gtm_xlog.c:2064
130236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->gts = 1000000000
131LOCATION: GTM_PrintControlData, gtm_xlog.c:2065
132236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->time = 1649666101
133LOCATION: GTM_PrintControlData, gtm_xlog.c:2066
134Done.
135Initialize all the coordinator masters.
136Initialize coordinator master cn001.
137Initialize coordinator master cn002.
138get master gtm nodename:gtm.
139get master gtm ip:172.72.6.100.
140get master gtm port:50001.
141The files belonging to this database system will be owned by user "tbase".
142This user must also own the server process.
143
144The database cluster will be initialized with locale "en_US.UTF-8".
145The default database encoding has accordingly been set to "UTF8".
146The default text search configuration will be set to "english".
147
148Data page checksums are disabled.
149
150fixing permissions on existing directory /data/tbase/coord ... ok
151creating subdirectories ... ok
152selecting default max_connections ... 100
153selecting default shared_buffers ... 128MB
154selecting dynamic shared memory implementation ... posix
155creating configuration files ... ok
156running bootstrap script ... 2022-04-11 16:35:04.858 CST [19034,coord(0.0)] LOG: init committs shmem.
1572022-04-11 16:35:05.402 CST [19034,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
1582022-04-11 16:35:05.402 CST [19034,coord(0.0)] LOG: startup commitTS.
1592022-04-11 16:35:05.402 CST [19034,coord(0.0)] LOG: activate commit ts.
1602022-04-11 16:35:05.402 CST [19034,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 0 xid 3 partition 0
1612022-04-11 16:35:05.402 CST [19034,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 0
1622022-04-11 16:35:05.402 CST [19034,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 0
1632022-04-11 16:35:05.761 CST [19034,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:295
1642022-04-11 16:35:05.761 CST [19034,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
1652022-04-11 16:35:05.761 CST [19034,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
1662022-04-11 16:35:05.761 CST [19034,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
1672022-04-11 16:35:05.761 CST [19034,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
1682022-04-11 16:35:05.761 CST [19034,coord(0.0)] LOG: shutdown committs
169ok
170performing post-bootstrap initialization ... creating cluster information ... 2022-04-11 16:35:05.922 CST [19041,coord(0.0)] LOG: init committs shmem.
1712022-04-11 16:35:06.446 CST [19041,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
1722022-04-11 16:35:06.446 CST [19041,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
1732022-04-11 16:35:06.544 CST [19041,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
1742022-04-11 16:35:06.544 CST [19041,coord(0.0)] LOG: startup commitTS.
1752022-04-11 16:35:06.544 CST [19041,coord(0.0)] LOG: activate commit ts.
1762022-04-11 16:35:06.544 CST [19041,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 0 xid 3 partition 0
1772022-04-11 16:35:06.545 CST [19041,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 0
1782022-04-11 16:35:06.545 CST [19041,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 0
1792022-04-11 16:35:07.856 CST [19041,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:1014
1802022-04-11 16:35:07.856 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
181
1822022-04-11 16:35:07.856 CST [19041,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
1832022-04-11 16:35:07.856 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
184
1852022-04-11 16:35:07.856 CST [19041,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
1862022-04-11 16:35:07.856 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
187
1882022-04-11 16:35:07.856 CST [19041,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
1892022-04-11 16:35:07.856 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
190
1912022-04-11 16:35:07.856 CST [19041,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
1922022-04-11 16:35:07.856 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
193
1942022-04-11 16:35:07.910 CST [19041,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:12
1952022-04-11 16:35:07.910 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
196
1972022-04-11 16:35:07.910 CST [19041,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
1982022-04-11 16:35:07.910 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
199
2002022-04-11 16:35:07.910 CST [19041,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
2012022-04-11 16:35:07.910 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
202
2032022-04-11 16:35:07.910 CST [19041,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
2042022-04-11 16:35:07.910 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
205
2062022-04-11 16:35:07.910 CST [19041,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
2072022-04-11 16:35:07.910 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
208
2092022-04-11 16:35:08.298 CST [19041,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:3
2102022-04-11 16:35:08.298 CST [19041,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
2112022-04-11 16:35:08.298 CST [19041,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
2122022-04-11 16:35:08.298 CST [19041,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
2132022-04-11 16:35:08.298 CST [19041,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
2142022-04-11 16:35:08.298 CST [19041,coord(0.0)] LOG: shutdown committs
215ok
216syncing data to disk ... ok
217freezing database template0 ... 2022-04-11 16:35:08.760 CST [19050,coord(0.0)] LOG: init committs shmem.
2182022-04-11 16:35:09.303 CST [19050,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
2192022-04-11 16:35:09.303 CST [19050,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
2202022-04-11 16:35:09.396 CST [19050,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
2212022-04-11 16:35:09.396 CST [19050,coord(0.0)] LOG: startup commitTS.
2222022-04-11 16:35:09.396 CST [19050,coord(0.0)] LOG: activate commit ts.
2232022-04-11 16:35:09.396 CST [19050,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
2242022-04-11 16:35:09.397 CST [19050,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
2252022-04-11 16:35:09.397 CST [19050,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
2262022-04-11 16:35:09.464 CST [19050,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:25
2272022-04-11 16:35:09.464 CST [19050,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
2282022-04-11 16:35:09.464 CST [19050,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
2292022-04-11 16:35:09.464 CST [19050,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
2302022-04-11 16:35:09.464 CST [19050,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
2312022-04-11 16:35:09.465 CST [19050,coord(0.0)] LOG: shutdown committs
232ok
233freezing database template1 ... 2022-04-11 16:35:09.608 CST [19057,coord(0.0)] LOG: init committs shmem.
2342022-04-11 16:35:10.170 CST [19057,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
2352022-04-11 16:35:10.170 CST [19057,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
2362022-04-11 16:35:10.287 CST [19057,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
2372022-04-11 16:35:10.287 CST [19057,coord(0.0)] LOG: startup commitTS.
2382022-04-11 16:35:10.287 CST [19057,coord(0.0)] LOG: activate commit ts.
2392022-04-11 16:35:10.287 CST [19057,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
2402022-04-11 16:35:10.288 CST [19057,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
2412022-04-11 16:35:10.288 CST [19057,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
2422022-04-11 16:35:10.353 CST [19057,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:16
2432022-04-11 16:35:10.353 CST [19057,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
2442022-04-11 16:35:10.353 CST [19057,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
2452022-04-11 16:35:10.353 CST [19057,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
2462022-04-11 16:35:10.353 CST [19057,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
2472022-04-11 16:35:10.353 CST [19057,coord(0.0)] LOG: shutdown committs
248ok
249freezing database postgres ... 2022-04-11 16:35:10.499 CST [19064,coord(0.0)] LOG: init committs shmem.
2502022-04-11 16:35:10.925 CST [19064,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
2512022-04-11 16:35:10.925 CST [19064,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
2522022-04-11 16:35:11.026 CST [19064,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
2532022-04-11 16:35:11.026 CST [19064,coord(0.0)] LOG: startup commitTS.
2542022-04-11 16:35:11.026 CST [19064,coord(0.0)] LOG: activate commit ts.
2552022-04-11 16:35:11.026 CST [19064,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
2562022-04-11 16:35:11.027 CST [19064,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
2572022-04-11 16:35:11.027 CST [19064,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
2582022-04-11 16:35:11.098 CST [19064,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:16
2592022-04-11 16:35:11.098 CST [19064,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
2602022-04-11 16:35:11.098 CST [19064,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
2612022-04-11 16:35:11.098 CST [19064,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
2622022-04-11 16:35:11.098 CST [19064,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
2632022-04-11 16:35:11.099 CST [19064,coord(0.0)] LOG: shutdown committs
264ok
265
266WARNING: enabling "trust" authentication for local connections
267You can change this by editing pg_hba.conf or using the option -A, or
268--auth-local and --auth-host, the next time you run initdb.
269
270Success.
271get master gtm nodename:gtm.
272get master gtm ip:172.72.6.100.
273get master gtm port:50001.
274The files belonging to this database system will be owned by user "tbase".
275This user must also own the server process.
276
277The database cluster will be initialized with locale "en_US.UTF-8".
278The default database encoding has accordingly been set to "UTF8".
279The default text search configuration will be set to "english".
280
281Data page checksums are disabled.
282
283fixing permissions on existing directory /data/tbase/coord ... ok
284creating subdirectories ... ok
285selecting default max_connections ... 100
286selecting default shared_buffers ... 128MB
287selecting dynamic shared memory implementation ... posix
288creating configuration files ... ok
289running bootstrap script ... 2022-04-11 16:35:04.719 CST [5765,coord(0.0)] LOG: init committs shmem.
2902022-04-11 16:35:05.302 CST [5765,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
2912022-04-11 16:35:05.302 CST [5765,coord(0.0)] LOG: startup commitTS.
2922022-04-11 16:35:05.302 CST [5765,coord(0.0)] LOG: activate commit ts.
2932022-04-11 16:35:05.302 CST [5765,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 0 xid 3 partition 0
2942022-04-11 16:35:05.302 CST [5765,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 0
2952022-04-11 16:35:05.302 CST [5765,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 0
2962022-04-11 16:35:05.599 CST [5765,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:295
2972022-04-11 16:35:05.599 CST [5765,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
2982022-04-11 16:35:05.599 CST [5765,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
2992022-04-11 16:35:05.599 CST [5765,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
3002022-04-11 16:35:05.599 CST [5765,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
3012022-04-11 16:35:05.600 CST [5765,coord(0.0)] LOG: shutdown committs
302ok
303performing post-bootstrap initialization ... creating cluster information ... 2022-04-11 16:35:05.717 CST [5772,coord(0.0)] LOG: init committs shmem.
3042022-04-11 16:35:06.284 CST [5772,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
3052022-04-11 16:35:06.284 CST [5772,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
3062022-04-11 16:35:06.375 CST [5772,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
3072022-04-11 16:35:06.375 CST [5772,coord(0.0)] LOG: startup commitTS.
3082022-04-11 16:35:06.375 CST [5772,coord(0.0)] LOG: activate commit ts.
3092022-04-11 16:35:06.375 CST [5772,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 0 xid 3 partition 0
3102022-04-11 16:35:06.376 CST [5772,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 0
3112022-04-11 16:35:06.376 CST [5772,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 0
3122022-04-11 16:35:07.658 CST [5772,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:1014
3132022-04-11 16:35:07.658 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
314
3152022-04-11 16:35:07.658 CST [5772,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
3162022-04-11 16:35:07.658 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
317
3182022-04-11 16:35:07.658 CST [5772,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
3192022-04-11 16:35:07.658 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
320
3212022-04-11 16:35:07.658 CST [5772,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
3222022-04-11 16:35:07.658 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
323
3242022-04-11 16:35:07.658 CST [5772,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
3252022-04-11 16:35:07.658 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
326
3272022-04-11 16:35:07.710 CST [5772,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:12
3282022-04-11 16:35:07.710 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
329
3302022-04-11 16:35:07.710 CST [5772,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
3312022-04-11 16:35:07.710 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
332
3332022-04-11 16:35:07.710 CST [5772,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
3342022-04-11 16:35:07.710 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
335
3362022-04-11 16:35:07.710 CST [5772,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
3372022-04-11 16:35:07.710 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
338
3392022-04-11 16:35:07.710 CST [5772,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
3402022-04-11 16:35:07.710 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
341
3422022-04-11 16:35:07.757 CST [5772,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:3
3432022-04-11 16:35:07.757 CST [5772,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
3442022-04-11 16:35:07.757 CST [5772,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
3452022-04-11 16:35:07.757 CST [5772,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
3462022-04-11 16:35:07.757 CST [5772,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
3472022-04-11 16:35:07.757 CST [5772,coord(0.0)] LOG: shutdown committs
348ok
349syncing data to disk ... ok
350freezing database template0 ... 2022-04-11 16:35:08.367 CST [5781,coord(0.0)] LOG: init committs shmem.
3512022-04-11 16:35:08.935 CST [5781,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
3522022-04-11 16:35:08.935 CST [5781,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
3532022-04-11 16:35:09.058 CST [5781,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
3542022-04-11 16:35:09.058 CST [5781,coord(0.0)] LOG: startup commitTS.
3552022-04-11 16:35:09.058 CST [5781,coord(0.0)] LOG: activate commit ts.
3562022-04-11 16:35:09.058 CST [5781,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
3572022-04-11 16:35:09.058 CST [5781,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
3582022-04-11 16:35:09.058 CST [5781,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
3592022-04-11 16:35:09.153 CST [5781,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:25
3602022-04-11 16:35:09.153 CST [5781,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
3612022-04-11 16:35:09.153 CST [5781,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
3622022-04-11 16:35:09.153 CST [5781,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
3632022-04-11 16:35:09.153 CST [5781,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
3642022-04-11 16:35:09.154 CST [5781,coord(0.0)] LOG: shutdown committs
365ok
366freezing database template1 ... 2022-04-11 16:35:09.325 CST [5788,coord(0.0)] LOG: init committs shmem.
3672022-04-11 16:35:09.857 CST [5788,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
3682022-04-11 16:35:09.857 CST [5788,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
3692022-04-11 16:35:09.949 CST [5788,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
3702022-04-11 16:35:09.949 CST [5788,coord(0.0)] LOG: startup commitTS.
3712022-04-11 16:35:09.949 CST [5788,coord(0.0)] LOG: activate commit ts.
3722022-04-11 16:35:09.949 CST [5788,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
3732022-04-11 16:35:09.949 CST [5788,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
3742022-04-11 16:35:09.949 CST [5788,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
3752022-04-11 16:35:10.015 CST [5788,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:16
3762022-04-11 16:35:10.015 CST [5788,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
3772022-04-11 16:35:10.015 CST [5788,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
3782022-04-11 16:35:10.015 CST [5788,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
3792022-04-11 16:35:10.015 CST [5788,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
3802022-04-11 16:35:10.015 CST [5788,coord(0.0)] LOG: shutdown committs
381ok
382freezing database postgres ... 2022-04-11 16:35:10.164 CST [5795,coord(0.0)] LOG: init committs shmem.
3832022-04-11 16:35:10.733 CST [5795,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
3842022-04-11 16:35:10.733 CST [5795,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
3852022-04-11 16:35:10.833 CST [5795,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
3862022-04-11 16:35:10.833 CST [5795,coord(0.0)] LOG: startup commitTS.
3872022-04-11 16:35:10.833 CST [5795,coord(0.0)] LOG: activate commit ts.
3882022-04-11 16:35:10.833 CST [5795,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
3892022-04-11 16:35:10.834 CST [5795,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
3902022-04-11 16:35:10.834 CST [5795,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
3912022-04-11 16:35:10.901 CST [5795,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:16
3922022-04-11 16:35:10.901 CST [5795,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
3932022-04-11 16:35:10.901 CST [5795,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
3942022-04-11 16:35:10.901 CST [5795,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
3952022-04-11 16:35:10.901 CST [5795,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
3962022-04-11 16:35:10.902 CST [5795,coord(0.0)] LOG: shutdown committs
397ok
398
399WARNING: enabling "trust" authentication for local connections
400You can change this by editing pg_hba.conf or using the option -A, or
401--auth-local and --auth-host, the next time you run initdb.
402
403Success.
404Done.
405Starting coordinator master.
406Starting coordinator master cn001
407Starting coordinator master cn002
4082022-04-11 16:35:14.598 CST [19445,coord(19445.0)] LOG: listening on IPv4 address "0.0.0.0", port 30004
4092022-04-11 16:35:14.598 CST [19445,coord(19445.0)] LOG: listening on IPv6 address "::", port 30004
4102022-04-11 16:35:14.640 CST [19445,coord(19445.0)] LOG: listening on Unix socket "/tmp/.s.PGSQL.30004"
4112022-04-11 16:35:14.734 CST [19445,coord(19445.0)] LOG: init committs shmem.
4122022-04-11 16:35:14.960 CST [19445,coord(19445.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
4132022-04-11 16:35:14.960 CST [19445,coord(19445.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
4142022-04-11 16:35:15.189 CST [19445,coord(19445.0)] LOG: redirecting log output to logging collector process
4152022-04-11 16:35:15.189 CST [19445,coord(19445.0)] HINT: Future log output will appear in directory "log".
4162022-04-11 16:35:14.598 CST [6094,coord(6094.0)] LOG: listening on IPv4 address "0.0.0.0", port 30004
4172022-04-11 16:35:14.598 CST [6094,coord(6094.0)] LOG: listening on IPv6 address "::", port 30004
4182022-04-11 16:35:14.640 CST [6094,coord(6094.0)] LOG: listening on Unix socket "/tmp/.s.PGSQL.30004"
4192022-04-11 16:35:14.734 CST [6094,coord(6094.0)] LOG: init committs shmem.
4202022-04-11 16:35:14.960 CST [6094,coord(6094.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
4212022-04-11 16:35:14.960 CST [6094,coord(6094.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
4222022-04-11 16:35:15.189 CST [6094,coord(6094.0)] LOG: redirecting log output to logging collector process
4232022-04-11 16:35:15.189 CST [6094,coord(6094.0)] HINT: Future log output will appear in directory "log".
424Done.
425Initialize all the datanode masters.
426Initialize the datanode master dn001.
427Initialize the datanode master dn002.
428get master gtm nodename:gtm.
429get master gtm ip:172.72.6.100.
430get master gtm port:50001.
431The files belonging to this database system will be owned by user "tbase".
432This user must also own the server process.
433
434The database cluster will be initialized with locale "en_US.UTF-8".
435The default database encoding has accordingly been set to "UTF8".
436The default text search configuration will be set to "english".
437
438Data page checksums are disabled.
439
440fixing permissions on existing directory /data/tbase/dn001 ... ok
441creating subdirectories ... ok
442selecting default max_connections ... 100
443selecting default shared_buffers ... 128MB
444selecting dynamic shared memory implementation ... posix
445creating configuration files ... ok
446running bootstrap script ... 2022-04-11 16:35:18.664 CST [21384,coord(0.0)] LOG: init committs shmem.
4472022-04-11 16:35:19.264 CST [21384,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
4482022-04-11 16:35:19.264 CST [21384,coord(0.0)] LOG: startup commitTS.
4492022-04-11 16:35:19.264 CST [21384,coord(0.0)] LOG: activate commit ts.
4502022-04-11 16:35:19.264 CST [21384,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 0 xid 3 partition 0
4512022-04-11 16:35:19.265 CST [21384,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 0
4522022-04-11 16:35:19.265 CST [21384,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 0
4532022-04-11 16:35:19.550 CST [21384,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:295
4542022-04-11 16:35:19.550 CST [21384,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
4552022-04-11 16:35:19.550 CST [21384,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
4562022-04-11 16:35:19.550 CST [21384,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
4572022-04-11 16:35:19.551 CST [21384,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
4582022-04-11 16:35:19.551 CST [21384,coord(0.0)] LOG: shutdown committs
459ok
460performing post-bootstrap initialization ... creating cluster information ... 2022-04-11 16:35:19.675 CST [22092,coord(0.0)] LOG: init committs shmem.
4612022-04-11 16:35:20.240 CST [22092,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
4622022-04-11 16:35:20.240 CST [22092,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
4632022-04-11 16:35:20.336 CST [22092,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
4642022-04-11 16:35:20.336 CST [22092,coord(0.0)] LOG: startup commitTS.
4652022-04-11 16:35:20.336 CST [22092,coord(0.0)] LOG: activate commit ts.
4662022-04-11 16:35:20.336 CST [22092,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 0 xid 3 partition 0
4672022-04-11 16:35:20.337 CST [22092,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 0
4682022-04-11 16:35:20.337 CST [22092,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 0
4692022-04-11 16:35:21.622 CST [22092,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:1014
4702022-04-11 16:35:21.622 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
471
4722022-04-11 16:35:21.622 CST [22092,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
4732022-04-11 16:35:21.622 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
474
4752022-04-11 16:35:21.622 CST [22092,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
4762022-04-11 16:35:21.622 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
477
4782022-04-11 16:35:21.622 CST [22092,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
4792022-04-11 16:35:21.622 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
480
4812022-04-11 16:35:21.622 CST [22092,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
4822022-04-11 16:35:21.622 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
483
4842022-04-11 16:35:21.707 CST [22092,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:12
4852022-04-11 16:35:21.707 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
486
4872022-04-11 16:35:21.707 CST [22092,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
4882022-04-11 16:35:21.707 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
489
4902022-04-11 16:35:21.707 CST [22092,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
4912022-04-11 16:35:21.707 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
492
4932022-04-11 16:35:21.707 CST [22092,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
4942022-04-11 16:35:21.707 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
495
4962022-04-11 16:35:21.707 CST [22092,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
4972022-04-11 16:35:21.707 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
498
4992022-04-11 16:35:21.788 CST [22092,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:3
5002022-04-11 16:35:21.788 CST [22092,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
5012022-04-11 16:35:21.788 CST [22092,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
5022022-04-11 16:35:21.788 CST [22092,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
5032022-04-11 16:35:21.788 CST [22092,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
5042022-04-11 16:35:21.789 CST [22092,coord(0.0)] LOG: shutdown committs
505ok
506syncing data to disk ... ok
507freezing database template0 ... 2022-04-11 16:35:23.032 CST [24125,coord(0.0)] LOG: init committs shmem.
5082022-04-11 16:35:23.526 CST [24125,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
5092022-04-11 16:35:23.526 CST [24125,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
5102022-04-11 16:35:23.625 CST [24125,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
5112022-04-11 16:35:23.625 CST [24125,coord(0.0)] LOG: startup commitTS.
5122022-04-11 16:35:23.625 CST [24125,coord(0.0)] LOG: activate commit ts.
5132022-04-11 16:35:23.625 CST [24125,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
5142022-04-11 16:35:23.625 CST [24125,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
5152022-04-11 16:35:23.625 CST [24125,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
5162022-04-11 16:35:23.698 CST [24125,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:25
5172022-04-11 16:35:23.698 CST [24125,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
5182022-04-11 16:35:23.698 CST [24125,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
5192022-04-11 16:35:23.698 CST [24125,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
5202022-04-11 16:35:23.698 CST [24125,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
5212022-04-11 16:35:23.699 CST [24125,coord(0.0)] LOG: shutdown committs
522ok
523freezing database template1 ... 2022-04-11 16:35:23.842 CST [24579,coord(0.0)] LOG: init committs shmem.
5242022-04-11 16:35:24.377 CST [24579,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
5252022-04-11 16:35:24.377 CST [24579,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
5262022-04-11 16:35:24.469 CST [24579,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
5272022-04-11 16:35:24.469 CST [24579,coord(0.0)] LOG: startup commitTS.
5282022-04-11 16:35:24.469 CST [24579,coord(0.0)] LOG: activate commit ts.
5292022-04-11 16:35:24.469 CST [24579,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
5302022-04-11 16:35:24.470 CST [24579,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
5312022-04-11 16:35:24.470 CST [24579,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
5322022-04-11 16:35:24.534 CST [24579,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:16
5332022-04-11 16:35:24.534 CST [24579,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
5342022-04-11 16:35:24.534 CST [24579,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
5352022-04-11 16:35:24.534 CST [24579,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
5362022-04-11 16:35:24.534 CST [24579,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
5372022-04-11 16:35:24.534 CST [24579,coord(0.0)] LOG: shutdown committs
538ok
539freezing database postgres ... 2022-04-11 16:35:24.679 CST [25043,coord(0.0)] LOG: init committs shmem.
5402022-04-11 16:35:25.248 CST [25043,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
5412022-04-11 16:35:25.248 CST [25043,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
5422022-04-11 16:35:25.346 CST [25043,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
5432022-04-11 16:35:25.346 CST [25043,coord(0.0)] LOG: startup commitTS.
5442022-04-11 16:35:25.346 CST [25043,coord(0.0)] LOG: activate commit ts.
5452022-04-11 16:35:25.346 CST [25043,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
5462022-04-11 16:35:25.347 CST [25043,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
5472022-04-11 16:35:25.347 CST [25043,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
5482022-04-11 16:35:25.415 CST [25043,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:16
5492022-04-11 16:35:25.415 CST [25043,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
5502022-04-11 16:35:25.415 CST [25043,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
5512022-04-11 16:35:25.415 CST [25043,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
5522022-04-11 16:35:25.415 CST [25043,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
5532022-04-11 16:35:25.416 CST [25043,coord(0.0)] LOG: shutdown committs
554ok
555
556WARNING: enabling "trust" authentication for local connections
557You can change this by editing pg_hba.conf or using the option -A, or
558--auth-local and --auth-host, the next time you run initdb.
559
560Success.
561get master gtm nodename:gtm.
562get master gtm ip:172.72.6.100.
563get master gtm port:50001.
564The files belonging to this database system will be owned by user "tbase".
565This user must also own the server process.
566
567The database cluster will be initialized with locale "en_US.UTF-8".
568The default database encoding has accordingly been set to "UTF8".
569The default text search configuration will be set to "english".
570
571Data page checksums are disabled.
572
573fixing permissions on existing directory /data/tbase/dn002 ... ok
574creating subdirectories ... ok
575selecting default max_connections ... 100
576selecting default shared_buffers ... 128MB
577selecting dynamic shared memory implementation ... posix
578creating configuration files ... ok
579running bootstrap script ... 2022-04-11 16:35:18.675 CST [8019,coord(0.0)] LOG: init committs shmem.
5802022-04-11 16:35:19.250 CST [8019,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
5812022-04-11 16:35:19.250 CST [8019,coord(0.0)] LOG: startup commitTS.
5822022-04-11 16:35:19.250 CST [8019,coord(0.0)] LOG: activate commit ts.
5832022-04-11 16:35:19.250 CST [8019,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 0 xid 3 partition 0
5842022-04-11 16:35:19.251 CST [8019,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 0
5852022-04-11 16:35:19.251 CST [8019,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 0
5862022-04-11 16:35:19.540 CST [8019,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:295
5872022-04-11 16:35:19.540 CST [8019,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
5882022-04-11 16:35:19.540 CST [8019,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
5892022-04-11 16:35:19.540 CST [8019,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
5902022-04-11 16:35:19.540 CST [8019,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
5912022-04-11 16:35:19.540 CST [8019,coord(0.0)] LOG: shutdown committs
592ok
593performing post-bootstrap initialization ... creating cluster information ... 2022-04-11 16:35:19.664 CST [8604,coord(0.0)] LOG: init committs shmem.
5942022-04-11 16:35:20.229 CST [8604,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
5952022-04-11 16:35:20.229 CST [8604,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
5962022-04-11 16:35:20.330 CST [8604,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
5972022-04-11 16:35:20.330 CST [8604,coord(0.0)] LOG: startup commitTS.
5982022-04-11 16:35:20.330 CST [8604,coord(0.0)] LOG: activate commit ts.
5992022-04-11 16:35:20.330 CST [8604,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 0 xid 3 partition 0
6002022-04-11 16:35:20.331 CST [8604,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 0
6012022-04-11 16:35:20.331 CST [8604,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 0
6022022-04-11 16:35:21.625 CST [8604,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:1014
6032022-04-11 16:35:21.625 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
604
6052022-04-11 16:35:21.625 CST [8604,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
6062022-04-11 16:35:21.625 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
607
6082022-04-11 16:35:21.625 CST [8604,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
6092022-04-11 16:35:21.625 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
610
6112022-04-11 16:35:21.625 CST [8604,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
6122022-04-11 16:35:21.625 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
613
6142022-04-11 16:35:21.625 CST [8604,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
6152022-04-11 16:35:21.625 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;
616
6172022-04-11 16:35:21.699 CST [8604,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:12
6182022-04-11 16:35:21.699 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
619
6202022-04-11 16:35:21.699 CST [8604,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
6212022-04-11 16:35:21.699 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
622
6232022-04-11 16:35:21.699 CST [8604,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
6242022-04-11 16:35:21.699 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
625
6262022-04-11 16:35:21.699 CST [8604,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
6272022-04-11 16:35:21.699 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
628
6292022-04-11 16:35:21.699 CST [8604,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
6302022-04-11 16:35:21.699 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE postgres;
631
6322022-04-11 16:35:21.772 CST [8604,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:3
6332022-04-11 16:35:21.772 CST [8604,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
6342022-04-11 16:35:21.772 CST [8604,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
6352022-04-11 16:35:21.772 CST [8604,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
6362022-04-11 16:35:21.772 CST [8604,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
6372022-04-11 16:35:21.773 CST [8604,coord(0.0)] LOG: shutdown committs
638ok
639syncing data to disk ... ok
640freezing database template0 ... 2022-04-11 16:35:23.032 CST [10613,coord(0.0)] LOG: init committs shmem.
6412022-04-11 16:35:23.596 CST [10613,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
6422022-04-11 16:35:23.596 CST [10613,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
6432022-04-11 16:35:23.719 CST [10613,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
6442022-04-11 16:35:23.719 CST [10613,coord(0.0)] LOG: startup commitTS.
6452022-04-11 16:35:23.719 CST [10613,coord(0.0)] LOG: activate commit ts.
6462022-04-11 16:35:23.719 CST [10613,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
6472022-04-11 16:35:23.719 CST [10613,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
6482022-04-11 16:35:23.719 CST [10613,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
6492022-04-11 16:35:23.799 CST [10613,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:25
6502022-04-11 16:35:23.799 CST [10613,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
6512022-04-11 16:35:23.799 CST [10613,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
6522022-04-11 16:35:23.799 CST [10613,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
6532022-04-11 16:35:23.799 CST [10613,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
6542022-04-11 16:35:23.799 CST [10613,coord(0.0)] LOG: shutdown committs
655ok
656freezing database template1 ... 2022-04-11 16:35:23.943 CST [11184,coord(0.0)] LOG: init committs shmem.
6572022-04-11 16:35:24.480 CST [11184,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
6582022-04-11 16:35:24.480 CST [11184,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
6592022-04-11 16:35:24.588 CST [11184,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
6602022-04-11 16:35:24.588 CST [11184,coord(0.0)] LOG: startup commitTS.
6612022-04-11 16:35:24.588 CST [11184,coord(0.0)] LOG: activate commit ts.
6622022-04-11 16:35:24.588 CST [11184,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
6632022-04-11 16:35:24.589 CST [11184,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
6642022-04-11 16:35:24.589 CST [11184,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
6652022-04-11 16:35:24.666 CST [11184,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:16
6662022-04-11 16:35:24.666 CST [11184,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
6672022-04-11 16:35:24.666 CST [11184,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
6682022-04-11 16:35:24.666 CST [11184,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
6692022-04-11 16:35:24.666 CST [11184,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
6702022-04-11 16:35:24.666 CST [11184,coord(0.0)] LOG: shutdown committs
671ok
672freezing database postgres ... 2022-04-11 16:35:24.827 CST [11690,coord(0.0)] LOG: init committs shmem.
6732022-04-11 16:35:25.253 CST [11690,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
6742022-04-11 16:35:25.253 CST [11690,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
6752022-04-11 16:35:25.348 CST [11690,coord(0.0)] LOG: read latestCommitTs 1 read latestGTS 1
6762022-04-11 16:35:25.348 CST [11690,coord(0.0)] LOG: startup commitTS.
6772022-04-11 16:35:25.348 CST [11690,coord(0.0)] LOG: activate commit ts.
6782022-04-11 16:35:25.348 CST [11690,coord(0.0)] LOG: ActivateCommitTs: committs latest page number 1 xid 599 partition 1
6792022-04-11 16:35:25.348 CST [11690,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 0
6802022-04-11 16:35:25.348 CST [11690,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 0
6812022-04-11 16:35:25.415 CST [11690,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:16
6822022-04-11 16:35:25.415 CST [11690,coord(0.0)] LOG: detail for workers:id:0-bufs:0,
6832022-04-11 16:35:25.415 CST [11690,coord(0.0)] LOG: detail for workers:id:1-bufs:0,
6842022-04-11 16:35:25.415 CST [11690,coord(0.0)] LOG: detail for workers:id:2-bufs:0,
6852022-04-11 16:35:25.415 CST [11690,coord(0.0)] LOG: detail for workers:id:3-bufs:0,
6862022-04-11 16:35:25.415 CST [11690,coord(0.0)] LOG: shutdown committs
687ok
688
689WARNING: enabling "trust" authentication for local connections
690You can change this by editing pg_hba.conf or using the option -A, or
691--auth-local and --auth-host, the next time you run initdb.
692
693Success.
694Done.
695Starting all the datanode masters.
696Starting datanode master dn001.
697Starting datanode master dn002.
6982022-04-11 16:35:31.137 CST [29046,coord(0.0)] LOG: listening on IPv4 address "0.0.0.0", port 40004
6992022-04-11 16:35:31.137 CST [29046,coord(0.0)] LOG: listening on IPv6 address "::", port 40004
7002022-04-11 16:35:31.199 CST [29046,coord(0.0)] LOG: listening on Unix socket "/tmp/.s.PGSQL.40004"
7012022-04-11 16:35:31.285 CST [29046,coord(0.0)] LOG: init committs shmem.
7022022-04-11 16:35:31.614 CST [29046,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
7032022-04-11 16:35:31.614 CST [29046,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
7042022-04-11 16:35:31.829 CST [29046,coord(0.0)] LOG: redirecting log output to logging collector process
7052022-04-11 16:35:31.829 CST [29046,coord(0.0)] HINT: Future log output will appear in directory "log".
7062022-04-11 16:35:31.137 CST [15412,coord(0.0)] LOG: listening on IPv4 address "0.0.0.0", port 40004
7072022-04-11 16:35:31.137 CST [15412,coord(0.0)] LOG: listening on IPv6 address "::", port 40004
7082022-04-11 16:35:31.199 CST [15412,coord(0.0)] LOG: listening on Unix socket "/tmp/.s.PGSQL.40004"
7092022-04-11 16:35:31.287 CST [15412,coord(0.0)] LOG: init committs shmem.
7102022-04-11 16:35:31.617 CST [15412,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
7112022-04-11 16:35:31.618 CST [15412,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
7122022-04-11 16:35:31.832 CST [15412,coord(0.0)] LOG: redirecting log output to logging collector process
7132022-04-11 16:35:31.832 CST [15412,coord(0.0)] HINT: Future log output will appear in directory "log".
714Done.
715Initialize all the datanode slaves.
716Initialize datanode slave dn001
717Initialize datanode slave dn002
718ERROR: target directory (/data/tbase/dn001) exists and not empty. Skip Datanode initilialization
719Starting all the datanode slaves.
720Starting datanode slave dn001.
721Starting datanode slave dn002.
7222022-04-11 16:35:40.438 CST [25052,coord(0.0)] LOG: listening on IPv4 address "0.0.0.0", port 50004
7232022-04-11 16:35:40.487 CST [25052,coord(0.0)] LOG: listening on Unix socket "/tmp/.s.PGSQL.50004"
7242022-04-11 16:35:40.557 CST [25052,coord(0.0)] LOG: init committs shmem.
7252022-04-11 16:35:40.861 CST [25052,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
7262022-04-11 16:35:40.861 CST [25052,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
7272022-04-11 16:35:41.061 CST [25052,coord(0.0)] LOG: redirecting log output to logging collector process
7282022-04-11 16:35:41.061 CST [25052,coord(0.0)] HINT: Future log output will appear in directory "log".
7292022-04-11 16:35:40.438 CST [6482,coord(0.0)] LOG: listening on IPv4 address "0.0.0.0", port 50004
7302022-04-11 16:35:40.487 CST [6482,coord(0.0)] LOG: listening on Unix socket "/tmp/.s.PGSQL.50004"
7312022-04-11 16:35:40.557 CST [6482,coord(0.0)] LOG: init committs shmem.
7322022-04-11 16:35:40.883 CST [6482,coord(0.0)] LOG: could not open file "global/pg_crypt_key.map":No such file or directory for bufFile merging.
7332022-04-11 16:35:40.883 CST [6482,coord(0.0)] LOG: could not open file "global/pg_rel_crypt.map":No such file or directory for bufFile merging.
7342022-04-11 16:35:41.117 CST [6482,coord(0.0)] LOG: redirecting log output to logging collector process
7352022-04-11 16:35:41.117 CST [6482,coord(0.0)] HINT: Future log output will appear in directory "log".
736Done.
737ALTER NODE cn001 WITH (HOST='172.72.6.100', PORT=30004);
738ALTER NODE
739CREATE NODE cn002 WITH (TYPE='coordinator', HOST='172.72.6.101', PORT=30004);
740CREATE NODE
741CREATE NODE dn001 WITH (TYPE='datanode', HOST='172.72.6.100', PORT=40004, PRIMARY, PREFERRED);
742CREATE NODE
743CREATE NODE dn002 WITH (TYPE='datanode', HOST='172.72.6.101', PORT=40004);
744CREATE NODE
745SELECT pgxc_pool_reload();
746 pgxc_pool_reload
747------------------
748 t
749(1 row)
750
751CREATE NODE cn001 WITH (TYPE='coordinator', HOST='172.72.6.100', PORT=30004);
752CREATE NODE
753ALTER NODE cn002 WITH (HOST='172.72.6.101', PORT=30004);
754ALTER NODE
755CREATE NODE dn001 WITH (TYPE='datanode', HOST='172.72.6.100', PORT=40004, PRIMARY);
756CREATE NODE
757CREATE NODE dn002 WITH (TYPE='datanode', HOST='172.72.6.101', PORT=40004, PREFERRED);
758CREATE NODE
759SELECT pgxc_pool_reload();
760 pgxc_pool_reload
761------------------
762 t
763(1 row)
764
765Done.
766EXECUTE DIRECT ON (dn001) 'CREATE NODE cn001 WITH (TYPE=''coordinator'', HOST=''172.72.6.100'', PORT=30004)';
767EXECUTE DIRECT
768EXECUTE DIRECT ON (dn001) 'CREATE NODE cn002 WITH (TYPE=''coordinator'', HOST=''172.72.6.101'', PORT=30004)';
769EXECUTE DIRECT
770EXECUTE DIRECT ON (dn001) 'ALTER NODE dn001 WITH (TYPE=''datanode'', HOST=''172.72.6.100'', PORT=40004, PRIMARY, PREFERRED)';
771EXECUTE DIRECT
772EXECUTE DIRECT ON (dn001) 'CREATE NODE dn002 WITH (TYPE=''datanode'', HOST=''172.72.6.101'', PORT=40004, PREFERRED)';
773EXECUTE DIRECT
774EXECUTE DIRECT ON (dn001) 'SELECT pgxc_pool_reload()';
775 pgxc_pool_reload
776------------------
777 t
778(1 row)
779
780EXECUTE DIRECT ON (dn002) 'CREATE NODE cn001 WITH (TYPE=''coordinator'', HOST=''172.72.6.100'', PORT=30004)';
781EXECUTE DIRECT
782EXECUTE DIRECT ON (dn002) 'CREATE NODE cn002 WITH (TYPE=''coordinator'', HOST=''172.72.6.101'', PORT=30004)';
783EXECUTE DIRECT
784EXECUTE DIRECT ON (dn002) 'CREATE NODE dn001 WITH (TYPE=''datanode'', HOST=''172.72.6.100'', PORT=40004, PRIMARY, PREFERRED)';
785EXECUTE DIRECT
786EXECUTE DIRECT ON (dn002) 'ALTER NODE dn002 WITH (TYPE=''datanode'', HOST=''172.72.6.101'', PORT=40004, PREFERRED)';
787EXECUTE DIRECT
788EXECUTE DIRECT ON (dn002) 'SELECT pgxc_pool_reload()';
789 pgxc_pool_reload
790------------------
791 t
792(1 row)
793
794Done.
795PGXC show config all
796========= Postgres-XL configuration Common Info ========================
797=== Overall ===
798Postgres-XL owner: tbase
799Postgres-XL user: tbase
800Postgres-XL install directory: /opt/tbase
801pgxc_ctl home: /home/tbase/pgxc_ctl
802pgxc_ctl configuration file: /tmp/pgxc_ctl.conf
803pgxc_ctl tmpDir: /tmp
804pgxc_ctl localTempDir: /tmp
805pgxc_ctl log file: /home/tbase/pgxc_ctl/pgxc_log/18363_pgxc_ctl.log
806pgxc_ctl configBackup: n
807pgxc_ctl configBackupHost: none
808pgxc_ctl configBackupFile: none
809========= Postgres-XL configuration End Common Info ===================
810====== Server: 172.72.6.100 =======
811GTM Master:
812 Nodename: 'gtm', port: 50001, dir: '/data/tbase/gtm' ExtraConfig: 'none', Specific Extra Config: 'none'
813Coordinator Master:
814 Nodename: 'cn001', port: 30004, pooler port: 31110
815 MaxWalSenders: 2, Dir: '/data/tbase/coord'
816 ExtraConfig: 'coordExtraConfig', Specific Extra Config: 'none'
817 pg_hba entries ( '0.0.0.0/0' )
818 Extra pg_hba: 'coordExtraPgHba', Specific Extra pg_hba: 'none'
819Datanode Master:
820 Nodename: 'dn001', port: 40004, pooler port 31110
821 MaxWALSenders: 4, Dir: '/data/tbase/dn001'
822 ExtraConfig: 'datanodeExtraConfig', Specific Extra Config: 'none'
823 pg_hba entries ( '0.0.0.0/0' )
824 Extra pg_hba: 'datanodeExtraPgHba', Specific Extra pg_hba: 'none'
825Datanode Slave:
826 Nodename: 'dn002', port: 50004, pooler port: 31110
827 Dir: '/data/tbase/dn002', Archive Log Dir: '/data/tbase/datanode_archlog/dn002'
828====== Server: 172.72.6.101 =======
829GTM Slave:
830 Nodename: 'gtm', port: 50001, dir: '/data/tbase/gtm' ExtraConfig: 'none', Specific Extra Config: 'none'
831Coordinator Master:
832 Nodename: 'cn002', port: 30004, pooler port: 31110
833 MaxWalSenders: 2, Dir: '/data/tbase/coord'
834 ExtraConfig: 'coordExtraConfig', Specific Extra Config: 'none'
835 pg_hba entries ( '0.0.0.0/0' )
836 Extra pg_hba: 'coordExtraPgHba', Specific Extra pg_hba: 'none'
837Datanode Master:
838 Nodename: 'dn002', port: 40004, pooler port 31110
839 MaxWALSenders: 4, Dir: '/data/tbase/dn002'
840 ExtraConfig: 'datanodeExtraConfig', Specific Extra Config: 'none'
841 pg_hba entries ( '0.0.0.0/0' )
842 Extra pg_hba: 'datanodeExtraPgHba', Specific Extra pg_hba: 'none'
843Datanode Slave:
844 Nodename: 'dn001', port: 50004, pooler port: 31110
845 Dir: '/data/tbase/dn001', Archive Log Dir: '/data/tbase/datanode_archlog/dn001'
846PGXC
847PGXC monitor all
848Running: gtm master
849Running: gtm slave
850Running: coordinator master cn001
851Running: coordinator master cn002
852Running: datanode master dn001
853Running: datanode slave dn001
854Running: datanode master dn002
855Running: datanode slave dn002
集群访问
1[tbase@lhrtbase100 ~]$ psql -h 172.72.6.100 -p 30004 -d postgres -U tbase
2psql (PostgreSQL 10.0 TBase V2)
3Type "help" for help.
4
5postgres=# select * from pgxc_node;
6 node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id | node_cluster_name
7-----------+-----------+-----------+--------------+----------------+------------------+------------+-------------------
8 gtm | G | 50001 | 172.72.6.100 | t | f | 428125959 | tbase_cluster
9 cn001 | C | 30004 | 172.72.6.100 | f | f | -264077367 | tbase_cluster
10 cn002 | C | 30004 | 172.72.6.101 | f | f | -674870440 | tbase_cluster
11 dn001 | D | 40004 | 172.72.6.100 | t | t | 2142761564 | tbase_cluster
12 dn002 | D | 40004 | 172.72.6.101 | f | f | -17499968 | tbase_cluster
13(5 rows)
14
15postgres=# \l
16 List of databases
17 Name | Owner | Encoding | Collate | Ctype | Access privileges
18-----------+-------+----------+-------------+-------------+-------------------
19 postgres | tbase | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
20 template0 | tbase | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/tbase +
21 | | | | | tbase=CTc/tbase
22 template1 | tbase | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/tbase +
23 | | | | | tbase=CTc/tbase
24(3 rows)
25postgres=# create database lhrdb;
26CREATE DATABASE
27[root@lhrtbase101 tbase]# psql -h 172.72.6.101 -p 30004 -d postgres -U tbase
28psql (PostgreSQL 10.0 TBase V2)
29Type "help" for help.
30
31postgres=# \l
32 List of databases
33 Name | Owner | Encoding | Collate | Ctype | Access privileges
34-----------+-------+----------+-------------+-------------+-------------------
35 lhrdb | tbase | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
36 postgres | tbase | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
37 template0 | tbase | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/tbase +
38 | | | | | tbase=CTc/tbase
39 template1 | tbase | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/tbase +
40 | | | | | tbase=CTc/tbase
41(4 rows)
42
创建测试表
1[tbase@lhrtbase100 ~]$ psql -h 172.72.6.100 -p 30004 -d lhrdb -U tbase
2psql (PostgreSQL 10.0 TBase V2)
3Type "help" for help.
4lhrdb=# create table test1(id int,name text);
5CREATE TABLE
6lhrdb=# insert into test1(id,name) select generate_series(1,8),'test';
7INSERT 0 8
8lhrdb=# select count(*) from test1;
9 count
10-------
11 8
12(1 row)
13
14lhrdb=# SELECT xc_node_id, count(*) FROM test1 GROUP BY xc_node_id;
15 xc_node_id | count
16------------+-------
17 -17499968 | 3
18 2142761564 | 5
19(2 rows)
20[tbase@lhrtbase100 ~]$ psql -h 172.72.6.101 -p 30004 -d lhrdb -U tbase -c "select count(*) from test1"
21 count
22-------
23 8
24(1 row)
25
26[tbase@lhrtbase100 ~]$ psql -h 172.72.6.100 -p 40004 -d lhrdb -U tbase -c "select count(*) from test1"
27 count
28-------
29 5
30(1 row)
31[tbase@lhrtbase100 ~]$ psql -h 172.72.6.101 -p 40004 -d lhrdb -U tbase -c "select count(*) from test1"
32 count
33-------
34 3
35(1 row)
36
创建default group以及sharding
TBase使用datanode group来增加节点的管理灵活度,要求有一个default group才能使用;
TBase数据分布为了增加灵活度,加了中间逻辑层来维护数据记录到物理节点的映射,叫sharding,要预先创建
1create default node group default_group with (dn001,dn002);
2create sharding group to group default_group;
参考
https://github.com/Tencent/TBase/wiki/1.-TBase_Quick_Start
https://blog.csdn.net/along1976/article/details/108124613
https://mp.weixin.qq.com/s/4v57_vOMM5EY5sWY4kSIhQ