Skip to content
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.
C PLpgSQL C++ Perl TSQL Yacc Other
Branch: master
Clone or download
Latest commit bb27ef3 Nov 12, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
config basecode commit Nov 7, 2019
contrib basecode commit Nov 7, 2019
doc basecode commit Nov 7, 2019
images basecode commit Nov 7, 2019
src change version Nov 12, 2019
.dir-locals.el basecode commit Nov 7, 2019
.gitignore basecode commit Nov 7, 2019 basecode commit Nov 7, 2019
COPYRIGHT dos2unix COPYRIGHT Nov 12, 2019 basecode commit Nov 7, 2019
HISTORY basecode commit Nov 7, 2019
LICENSE.txt basecode commit Nov 7, 2019
Makefile basecode commit Nov 7, 2019 Modify readme content Nov 12, 2019
aclocal.m4 basecode commit Nov 7, 2019
configure basecode commit Nov 7, 2019 basecode commit Nov 7, 2019


TBase Database Management System

TBase is an advanced enterprise-level database management system based on prior work of Postgres-XL project.It supports an extended subset of the SQL standard, including transactions, foreign keys, user-defined types and functions Additional,it adds parallel computing, security, management, audit and other functions.

TBase has many language interfaces similar to PostgreSQL, many of which are listed here:


A TBase cluster consists of multiple CoordinateNodes ,DataNodes, and GTM nodes. All user data resides in the DataNode, the CoordinateNode contains only metadata, the GTM for global transaction management. The CoordinateNodes, and DataNodes, share the same schema.

Users always connect to the CoordinateNodes, which divides up the query into fragments that are executed in the DataNodes, and collects the results.

The latest version of this software may be obtained at:

For more information look at our web site located at:


	rm -rf ${INSTALL_PATH}/tbase_bin_v2.0
	chmod +x configure*
	./configure --prefix=${INSTALL_PATH}/tbase_bin_v2.0  --enable-user-switch --with-openssl  --with-ossp-uuid CFLAGS=-g
	make clean
	make -sj
	make install
	chmod +x contrib/pgxc_ctl/make_signature
	cd contrib
	make -sj
	make install


Use PGXC_CTL tool to build a cluster, for example: a cluster with a global transaction management node (GTM), a coordinator(COORDINATOR) and two data nodes (DATANODE)



  1. Install pgxc and import the path of pgxc installation package into environment variable

    export PATH="$PATH:$PG_HOME/bin"  
    export LC_ALL=C
  2. Get through the SSH password free login between the machines where the cluster node is installed, and then deploy and init will SSH to the machines of each node. After getting through, you do not need to enter the password.

    ssh-keygen -t rsa
    ssh-copy-id -i ~/.ssh/ destination-user@destination-server

Cluster startup steps

  1. Generate and fill in configuration file pgxc_ctl.conf. pgxc_ctl tool can generate a template for the configuration file. You need to fill in the cluster node information in the template. After the pgxc_ctl tool is started, a template of pgxc_ctl directory and configuration file will be generated in the current user's home directory, which can be modified directly.

    • The pgxcInstallDir at the beginning of the configuration file refers to the installation package location of pgxc. The database user can set it according to his own needs.
    • For GTM, you need to configure the node name, IP, port and node directory
    #---- GTM ----------
    • If you do not need gtmSlave, you can directly set it to 'n' in the configuration of the corresponding node

    If you need gtmSlave, configure it according to the instructions in the configuration file

    • Coordination node, which needs to be configured with IP, port, directory, etc
    • Data node, similar to the above nodes: IP, port, directory, etc. (since there are two data nodes, you need to configure the same information as the number of nodes.)
    datanodeNames=(dn001 dn002)
    datanodePorts=(20008 20009)
    datanodePoolerPorts=(20018 20019)
    datanodeMasterCluster=(tbase_cluster tbase_cluster)
    datanodeMasterDirs=(${DATANODE_MASTER_DATA_DIR}/data/dn_master/dn001 ${DATANODE_MASTER_DATA_DIR}/data/dn_master/dn002)

    There are coordSlave and datanodeSlave corresponding to the coordination node and data node. If not, configure them as 'n'; otherwise, configure them according to the configuration file.

    In addition, two type ports: poolerPort and port, need to be configured for coordinator node and datanode. poolerPort is used by nodes to communicate with other nodes. port is the port used to login to the node. Here, poolerPort and port must be configured differently, otherwise there will be conflicts and the cluster cannot be started.

    Each node needs to have its own directory and cannot be created in the same directory.

  2. Distribution of installation package(deploy all)。After filling in the configuration file, run the pgxc_ctl tool,and then input "deploy all" command to distribute the installation package to the IP machine of each node.

  3. Initialize each node of the cluster(init all)。After the distribution of the installation package is completed, input "init all" command in pgxc_ctl tool to initialize all the nodes in the configuration file pgxc_ctl.conf and start the cluster. So far, the cluster has started.


	psql -h ${CoordinateNode_IP} -p ${CoordinateNode_PORT} -U ${pgxcOwner} -d postgres


The TBase is licensed under the BSD 3-Clause License. Copyright and license information can be found in the file LICENSE.txt

You can’t perform that action at this time.