简介
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/init121314docker rm -f lhrtbase10115docker 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 910echo "tbase:lhr" | chpasswd111213cat >> /home/tbase/.bashrc << 'EOF'14export TBASE_HOME=/opt/tbase15export PATH="$PATH:$TBASE_HOME/bin"16export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TBASE_HOME/lib"17EOF18source /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_signature10cd contrib11make -sj12make install
配置ssh互信
只在节点1操作:
1./sshUserSetup.sh -user tbase -hosts "lhrtbase100 lhrtbase101" -advanced exverify -confirm234sudo 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_archlog100dn2ALDir=/data/tbase/datanode_archlog101102primaryDatanode=dn001103datanodeNames=(dn001 dn002)104datanodePorts=(40004 40004)105datanodePoolerPorts=(41110 41110)106datanodePgHbaEntries=(0.0.0.0/0)107datanodeMasterServers=($m1 $m2)108datanodeMasterDirs=($dn1MstrDir $dn2MstrDir)109dnWALSndr=4110datanodeMaxWALSenders=($dnWALSndr $dnWALSndr)111112datanodeSlave=y113datanodeSlaveServers=($m2 $m1)114datanodeSlavePorts=(50004 50004)115datanodeSlavePoolerPorts=(51110 51110)116datanodeSlaveSync=n117datanodeSlaveDirs=($dn1SlvDir $dn2SlvDir)118datanodeArchLogDirs=($dn1ALDir/dn001 $dn2ALDir/dn002)119120datanodeExtraConfig=datanodeExtraConfig121cat > $datanodeExtraConfig <<EOF122#================================================123# Added to all the coordinator postgresql.conf124# Original: $datanodeExtraConfig125# 此处适应性修改后 dn slave可正常启动126listen_addresses = '0.0.0.0'127max_connections = 500128max_pool_size = 65535129shared_buffers = 1GB130max_prepared_transactions = 2000131maintenance_work_mem = 256MB132wal_level = logical133max_wal_senders = 64134max_wal_size = 1GB135min_wal_size = 256MB136log_destination = 'csvlog'137logging_collector = on138log_directory = 'log'139log_filename = 'postgresql-%A-%H.log'140synchronous_commit = local141synchronous_standby_names = ''142143EOF144145datanodeSpecificExtraConfig=(none none)146datanodeExtraPgHba=datanodeExtraPgHba147cat > $datanodeExtraPgHba <<EOF148149local all all trust150host all all 0.0.0.0/0 trust151host replication all 0.0.0.0/0 trust152host all all ::1/128 trust153host replication all ::1/128 trust154host replication all $m1/32 trust 155host all all $m1/32 trust 156host replication all $m2/32 trust 157host all all $m2/32 trust158host all all 0.0.0.0/0 md5159160EOF161162datanodeSpecificExtraPgHba=(none none)163164datanodeAdditionalSlaves=n165walArchive=n166167168EOF00
初始化数据库
只在节点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 all11# 启停服务12> stop all -m fast13> start all14# 监控集群15> monitor all16# 清除集群:用于重新部署17> clean all181920-- d21[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.101102103fixing permissions on existing directory /data/tbase/gtm ... ok104creating configuration files ... ok105creating xlog dir ... ok106107Success.108Done.109Start GTM slaveserver starting110236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData context:111LOCATION: GTM_PrintControlData, gtm_xlog.c:2055112236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->gtm_control_version = 20180716113LOCATION: GTM_PrintControlData, gtm_xlog.c:2056114236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->xlog_seg_size = 2097152115LOCATION: GTM_PrintControlData, gtm_xlog.c:2057116236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->xlog_blcksz = 4096117LOCATION: GTM_PrintControlData, gtm_xlog.c:2058118236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->state = 1119LOCATION: GTM_PrintControlData, gtm_xlog.c:2059120236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->CurrBytePos = 4080121LOCATION: GTM_PrintControlData, gtm_xlog.c:2060122236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->PrevBytePos = 4080123LOCATION: GTM_PrintControlData, gtm_xlog.c:2061124236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->thisTimeLineID = 1125LOCATION: GTM_PrintControlData, gtm_xlog.c:2062126236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->prevCheckPoint = 0/0127LOCATION: GTM_PrintControlData, gtm_xlog.c:2063128236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->checkPoint = 0/1000129LOCATION: GTM_PrintControlData, gtm_xlog.c:2064130236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->gts = 1000000000131LOCATION: GTM_PrintControlData, gtm_xlog.c:2065132236943168:2022-04-11 16:35:01.928 CST -LOG: ControlData->time = 1649666101133LOCATION: GTM_PrintControlData, gtm_xlog.c:2066134Done.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.143144The 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".147148Data page checksums are disabled.149150fixing permissions on existing directory /data/tbase/coord ... ok151creating subdirectories ... ok152selecting default max_connections ... 100153selecting default shared_buffers ... 128MB154selecting dynamic shared memory implementation ... posix155creating configuration files ... ok156running 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 11582022-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 01612022-04-11 16:35:05.402 CST [19034,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 01622022-04-11 16:35:05.402 CST [19034,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 01632022-04-11 16:35:05.761 CST [19034,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:2951642022-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 committs169ok170performing 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 11742022-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 01772022-04-11 16:35:06.545 CST [19041,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 01782022-04-11 16:35:06.545 CST [19041,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 01792022-04-11 16:35:07.856 CST [19041,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:10141802022-04-11 16:35:07.856 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;1811822022-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;1841852022-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;1871882022-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;1901912022-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;1931942022-04-11 16:35:07.910 CST [19041,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:121952022-04-11 16:35:07.910 CST [19041,coord(0.0)] STATEMENT: CREATE DATABASE postgres;1961972022-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;1992002022-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;2022032022-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;2052062022-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;2082092022-04-11 16:35:08.298 CST [19041,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:32102022-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 committs215ok216syncing data to disk ... ok217freezing 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 12212022-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 12242022-04-11 16:35:09.397 CST [19050,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 02252022-04-11 16:35:09.397 CST [19050,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 02262022-04-11 16:35:09.464 CST [19050,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:252272022-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 committs232ok233freezing 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 12372022-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 12402022-04-11 16:35:10.288 CST [19057,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 02412022-04-11 16:35:10.288 CST [19057,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 02422022-04-11 16:35:10.353 CST [19057,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:162432022-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 committs248ok249freezing 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 12532022-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 12562022-04-11 16:35:11.027 CST [19064,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 02572022-04-11 16:35:11.027 CST [19064,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 02582022-04-11 16:35:11.098 CST [19064,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:162592022-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 committs264ok265266WARNING: enabling "trust" authentication for local connections267You can change this by editing pg_hba.conf or using the option -A, or268--auth-local and --auth-host, the next time you run initdb.269270Success.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.276277The 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".280281Data page checksums are disabled.282283fixing permissions on existing directory /data/tbase/coord ... ok284creating subdirectories ... ok285selecting default max_connections ... 100286selecting default shared_buffers ... 128MB287selecting dynamic shared memory implementation ... posix288creating configuration files ... ok289running 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 12912022-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 02942022-04-11 16:35:05.302 CST [5765,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 02952022-04-11 16:35:05.302 CST [5765,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 02962022-04-11 16:35:05.599 CST [5765,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:2952972022-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 committs302ok303performing 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 13072022-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 03102022-04-11 16:35:06.376 CST [5772,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 03112022-04-11 16:35:06.376 CST [5772,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 03122022-04-11 16:35:07.658 CST [5772,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:10143132022-04-11 16:35:07.658 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;3143152022-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;3173182022-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;3203212022-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;3233242022-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;3263272022-04-11 16:35:07.710 CST [5772,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:123282022-04-11 16:35:07.710 CST [5772,coord(0.0)] STATEMENT: CREATE DATABASE postgres;3293302022-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;3323332022-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;3353362022-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;3383392022-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;3413422022-04-11 16:35:07.757 CST [5772,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:33432022-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 committs348ok349syncing data to disk ... ok350freezing 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 13542022-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 13572022-04-11 16:35:09.058 CST [5781,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 03582022-04-11 16:35:09.058 CST [5781,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 03592022-04-11 16:35:09.153 CST [5781,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:253602022-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 committs365ok366freezing 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 13702022-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 13732022-04-11 16:35:09.949 CST [5788,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 03742022-04-11 16:35:09.949 CST [5788,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 03752022-04-11 16:35:10.015 CST [5788,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:163762022-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 committs381ok382freezing 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 13862022-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 13892022-04-11 16:35:10.834 CST [5795,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 03902022-04-11 16:35:10.834 CST [5795,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 03912022-04-11 16:35:10.901 CST [5795,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:163922022-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 committs397ok398399WARNING: enabling "trust" authentication for local connections400You can change this by editing pg_hba.conf or using the option -A, or401--auth-local and --auth-host, the next time you run initdb.402403Success.404Done.405Starting coordinator master.406Starting coordinator master cn001407Starting coordinator master cn0024082022-04-11 16:35:14.598 CST [19445,coord(19445.0)] LOG: listening on IPv4 address "0.0.0.0", port 300044092022-04-11 16:35:14.598 CST [19445,coord(19445.0)] LOG: listening on IPv6 address "::", port 300044102022-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 process4152022-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 300044172022-04-11 16:35:14.598 CST [6094,coord(6094.0)] LOG: listening on IPv6 address "::", port 300044182022-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 process4232022-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.433434The 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".437438Data page checksums are disabled.439440fixing permissions on existing directory /data/tbase/dn001 ... ok441creating subdirectories ... ok442selecting default max_connections ... 100443selecting default shared_buffers ... 128MB444selecting dynamic shared memory implementation ... posix445creating configuration files ... ok446running 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 14482022-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 04512022-04-11 16:35:19.265 CST [21384,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 04522022-04-11 16:35:19.265 CST [21384,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 04532022-04-11 16:35:19.550 CST [21384,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:2954542022-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 committs459ok460performing 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 14642022-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 04672022-04-11 16:35:20.337 CST [22092,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 04682022-04-11 16:35:20.337 CST [22092,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 04692022-04-11 16:35:21.622 CST [22092,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:10144702022-04-11 16:35:21.622 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;4714722022-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;4744752022-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;4774782022-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;4804812022-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;4834842022-04-11 16:35:21.707 CST [22092,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:124852022-04-11 16:35:21.707 CST [22092,coord(0.0)] STATEMENT: CREATE DATABASE postgres;4864872022-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;4894902022-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;4924932022-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;4954962022-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;4984992022-04-11 16:35:21.788 CST [22092,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:35002022-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 committs505ok506syncing data to disk ... ok507freezing 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 15112022-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 15142022-04-11 16:35:23.625 CST [24125,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 05152022-04-11 16:35:23.625 CST [24125,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 05162022-04-11 16:35:23.698 CST [24125,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:255172022-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 committs522ok523freezing 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 15272022-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 15302022-04-11 16:35:24.470 CST [24579,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 05312022-04-11 16:35:24.470 CST [24579,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 05322022-04-11 16:35:24.534 CST [24579,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:165332022-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 committs538ok539freezing 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 15432022-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 15462022-04-11 16:35:25.347 CST [25043,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 05472022-04-11 16:35:25.347 CST [25043,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 05482022-04-11 16:35:25.415 CST [25043,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:165492022-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 committs554ok555556WARNING: enabling "trust" authentication for local connections557You can change this by editing pg_hba.conf or using the option -A, or558--auth-local and --auth-host, the next time you run initdb.559560Success.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.566567The 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".570571Data page checksums are disabled.572573fixing permissions on existing directory /data/tbase/dn002 ... ok574creating subdirectories ... ok575selecting default max_connections ... 100576selecting default shared_buffers ... 128MB577selecting dynamic shared memory implementation ... posix578creating configuration files ... ok579running 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 15812022-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 05842022-04-11 16:35:19.251 CST [8019,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 05852022-04-11 16:35:19.251 CST [8019,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 05862022-04-11 16:35:19.540 CST [8019,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:2955872022-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 committs592ok593performing 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 15972022-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 06002022-04-11 16:35:20.331 CST [8604,coord(0.0)] LOG: startup CLOG next xid 3 latest page number 06012022-04-11 16:35:20.331 CST [8604,coord(0.0)] LOG: Trim CLOG next xid 3 latest page number 06022022-04-11 16:35:21.625 CST [8604,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:10146032022-04-11 16:35:21.625 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE template0 IS_TEMPLATE = true ALLOW_CONNECTIONS = false;6046052022-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;6076082022-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;6106112022-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;6136142022-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;6166172022-04-11 16:35:21.699 CST [8604,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:126182022-04-11 16:35:21.699 CST [8604,coord(0.0)] STATEMENT: CREATE DATABASE postgres;6196202022-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;6226232022-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;6256262022-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;6286292022-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;6316322022-04-11 16:35:21.772 CST [8604,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:36332022-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 committs638ok639syncing data to disk ... ok640freezing 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 16442022-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 16472022-04-11 16:35:23.719 CST [10613,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 06482022-04-11 16:35:23.719 CST [10613,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 06492022-04-11 16:35:23.799 CST [10613,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:256502022-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 committs655ok656freezing 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 16602022-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 16632022-04-11 16:35:24.589 CST [11184,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 06642022-04-11 16:35:24.589 CST [11184,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 06652022-04-11 16:35:24.666 CST [11184,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:166662022-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 committs671ok672freezing 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 16762022-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 16792022-04-11 16:35:25.348 CST [11690,coord(0.0)] LOG: startup CLOG next xid 599 latest page number 06802022-04-11 16:35:25.348 CST [11690,coord(0.0)] LOG: Trim CLOG next xid 599 latest page number 06812022-04-11 16:35:25.415 CST [11690,coord(0.0)] LOG: CHECKPOINT:in one round, buffer crypted write:0, normal buffer write:166822022-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 committs687ok688689WARNING: enabling "trust" authentication for local connections690You can change this by editing pg_hba.conf or using the option -A, or691--auth-local and --auth-host, the next time you run initdb.692693Success.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 400046992022-04-11 16:35:31.137 CST [29046,coord(0.0)] LOG: listening on IPv6 address "::", port 400047002022-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 process7052022-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 400047072022-04-11 16:35:31.137 CST [15412,coord(0.0)] LOG: listening on IPv6 address "::", port 400047082022-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 process7132022-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 dn001717Initialize datanode slave dn002718ERROR: target directory (/data/tbase/dn001) exists and not empty. Skip Datanode initilialization719Starting 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 500047232022-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 process7282022-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 500047302022-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 process7352022-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 NODE739CREATE NODE cn002 WITH (TYPE='coordinator', HOST='172.72.6.101', PORT=30004);740CREATE NODE741CREATE NODE dn001 WITH (TYPE='datanode', HOST='172.72.6.100', PORT=40004, PRIMARY, PREFERRED);742CREATE NODE743CREATE NODE dn002 WITH (TYPE='datanode', HOST='172.72.6.101', PORT=40004);744CREATE NODE745SELECT pgxc_pool_reload();746 pgxc_pool_reload 747------------------748 t749(1 row)750751CREATE NODE cn001 WITH (TYPE='coordinator', HOST='172.72.6.100', PORT=30004);752CREATE NODE753ALTER NODE cn002 WITH (HOST='172.72.6.101', PORT=30004);754ALTER NODE755CREATE NODE dn001 WITH (TYPE='datanode', HOST='172.72.6.100', PORT=40004, PRIMARY);756CREATE NODE757CREATE NODE dn002 WITH (TYPE='datanode', HOST='172.72.6.101', PORT=40004, PREFERRED);758CREATE NODE759SELECT pgxc_pool_reload();760 pgxc_pool_reload 761------------------762 t763(1 row)764765Done.766EXECUTE DIRECT ON (dn001) 'CREATE NODE cn001 WITH (TYPE=''coordinator'', HOST=''172.72.6.100'', PORT=30004)';767EXECUTE DIRECT768EXECUTE DIRECT ON (dn001) 'CREATE NODE cn002 WITH (TYPE=''coordinator'', HOST=''172.72.6.101'', PORT=30004)';769EXECUTE DIRECT770EXECUTE DIRECT ON (dn001) 'ALTER NODE dn001 WITH (TYPE=''datanode'', HOST=''172.72.6.100'', PORT=40004, PRIMARY, PREFERRED)';771EXECUTE DIRECT772EXECUTE DIRECT ON (dn001) 'CREATE NODE dn002 WITH (TYPE=''datanode'', HOST=''172.72.6.101'', PORT=40004, PREFERRED)';773EXECUTE DIRECT774EXECUTE DIRECT ON (dn001) 'SELECT pgxc_pool_reload()';775 pgxc_pool_reload 776------------------777 t778(1 row)779780EXECUTE DIRECT ON (dn002) 'CREATE NODE cn001 WITH (TYPE=''coordinator'', HOST=''172.72.6.100'', PORT=30004)';781EXECUTE DIRECT782EXECUTE DIRECT ON (dn002) 'CREATE NODE cn002 WITH (TYPE=''coordinator'', HOST=''172.72.6.101'', PORT=30004)';783EXECUTE DIRECT784EXECUTE DIRECT ON (dn002) 'CREATE NODE dn001 WITH (TYPE=''datanode'', HOST=''172.72.6.100'', PORT=40004, PRIMARY, PREFERRED)';785EXECUTE DIRECT786EXECUTE DIRECT ON (dn002) 'ALTER NODE dn002 WITH (TYPE=''datanode'', HOST=''172.72.6.101'', PORT=40004, PREFERRED)';787EXECUTE DIRECT788EXECUTE DIRECT ON (dn002) 'SELECT pgxc_pool_reload()';789 pgxc_pool_reload 790------------------791 t792(1 row)793794Done.795PGXC show config all796========= Postgres-XL configuration Common Info ========================797=== Overall ===798Postgres-XL owner: tbase799Postgres-XL user: tbase800Postgres-XL install directory: /opt/tbase801pgxc_ctl home: /home/tbase/pgxc_ctl802pgxc_ctl configuration file: /tmp/pgxc_ctl.conf803pgxc_ctl tmpDir: /tmp804pgxc_ctl localTempDir: /tmp805pgxc_ctl log file: /home/tbase/pgxc_ctl/pgxc_log/18363_pgxc_ctl.log806pgxc_ctl configBackup: n807pgxc_ctl configBackupHost: none808pgxc_ctl configBackupFile: none809========= 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: 31110815 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 31110821 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: 31110827 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: 31110833 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 31110839 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: 31110845 Dir: '/data/tbase/dn001', Archive Log Dir: '/data/tbase/datanode_archlog/dn001'846PGXC 847PGXC monitor all848Running: gtm master849Running: gtm slave850Running: coordinator master cn001851Running: coordinator master cn002852Running: datanode master dn001853Running: datanode slave dn001854Running: datanode master dn002855Running: 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_cluster10 cn002 | C | 30004 | 172.72.6.101 | f | f | -674870440 | tbase_cluster11 dn001 | D | 40004 | 172.72.6.100 | t | t | 2142761564 | tbase_cluster12 dn002 | D | 40004 | 172.72.6.101 | f | f | -17499968 | tbase_cluster13(5 rows)1415postgres=# \l16 List of databases17 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/tbase22 template1 | tbase | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/tbase +23 | | | | | tbase=CTc/tbase24(3 rows) 25postgres=# create database lhrdb;26CREATE DATABASE27[root@lhrtbase101 tbase]# psql -h 172.72.6.101 -p 30004 -d postgres -U tbase28psql (PostgreSQL 10.0 TBase V2)29Type "help" for help.3031postgres=# \l32 List of databases33 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/tbase39 template1 | tbase | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/tbase +40 | | | | | tbase=CTc/tbase41(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 812(1 row)1314lhrdb=# SELECT xc_node_id, count(*) FROM test1 GROUP BY xc_node_id;15 xc_node_id | count 16------------+-------17 -17499968 | 318 2142761564 | 519(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 824(1 row)2526[tbase@lhrtbase100 ~]$ psql -h 172.72.6.100 -p 40004 -d lhrdb -U tbase -c "select count(*) from test1" 27 count 28-------29 530(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 335(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